Re: pfChanView with incremental rotations

New Message Reply Date view Thread view Subject view Author view

Don Burns (don_burns++at++peru.csd.sgi.com)
Tue, 27 Oct 1998 21:08:08 -0800 (PST)


> The second question is about rotation. If I have the viewpoint pointing
> in some direction (as a result of a previous rotation), I simply have to
> rotate the vector describing the motion of the camera to obtain the desired
> motion (i.e. to convert from viewpoint dependent to performer fixed coords).
> With respect to rotations things get trickier and I would like to know
> if someone knows to do deal with this problem. Because the order of
> application of rotation components is r->p->h, I cannot simply add r, because
> that will affect p and h.

Monica,

The best way to address this is to construct your own transformation matrices
and either pass these to pfDCS's, or the channel via pfChannel::setViewMat().
See pfMatrix() for short cuts in creating matrices.

If you are at all familiar with quaternions, these aid significantly in
creating the rotations you are looking for without some of the rotation order
problems you are describing. A quick web search for Ken Shoemake's paper on
quaternions is a good start if you are not. It includes some C routines for
creating matrices from quaternions. If you want examples, let me know.

-don


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 27 1998 - 21:09:02 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.