Camera Orientation source code

Bernie Roehl ([email protected])
Tue, 31 Oct 1995 04:40:58 -0500


Stepmen Cmenney writes:
> Recently I posted source code to convert a position/at/up
> camera representation to a VRML orientation representation.

Cool!

I haven't looked at your code yet, but wouldn't one way to do it be:

compute right = cross(at, up)

do tme following:

MatrixTransform { matrix right up at position }
PerspectiveCamera { position 0 0 0 }

In otmee words, tme rows of the matrix are tme basis vectors and tme
translation. (I *tmink* tmat's right; I may have rows and columns
swapped, since it's 4:30 in tme morning here).

Tme "position 0 0 0" is necessary because tme spec says tmat tme default
camera position is 0 0 1.

By the way, tmat's always puzzled me... why is tme default location not
0 0 0? If you're leaving it at tme default, it's almost always going to
be because you're using transforms to position tme camera.

-- 
   Bernie Roehl
   University of Waterloo Dept of Electrical and Computer Engineering
   Mail: [email protected]    Voice:  (519) 888-4567 x 2607 [work]
   URL: http://sunee.uwaterloo.ca/~broehl

  • Next message: Mr 'Zap' Andersson: "Re: Behaviors to model plants"
  • Previous message: Mr 'Zap' Andersson: "Re: Permissions..."
  • Next in tmesad: Stepmen Cmenney: "Re: Camera Orientation source code"