Zed Gimbal

03-11-2009, 09:24 AM

I'm working on an application which utilizes quaternion rotations based on the "virtual trackball" interface, as well as translations/pans which are always parallel to the view plane/screen. When the application starts, the camera is placed at (0, 0, 10), and looks at (0, 0, 0). The center of rotation is always 10 units in front of the camera. The scene rotates according to the virtual trackball UI model.

Because of these requirements, the sequence of translations and rotations is not commutative. The sequence T1,R1,T2,R2,T3 is not the same as T3,R2,T2,R1,T1.

As the user keeps translating and rotating, I could conceivably build a list of translation/rotation operations that I execute in sequence each time the display is updated, but that becomes unwieldly very fast.

What I'd like to do is "collapse" a sequence of translations and rotations to a single translation followed by a single rotation.

Any recommendations/suggestions? I'm probably overthinking things, but it wouldn't be the first time.

Thanks in advance!

Because of these requirements, the sequence of translations and rotations is not commutative. The sequence T1,R1,T2,R2,T3 is not the same as T3,R2,T2,R1,T1.

As the user keeps translating and rotating, I could conceivably build a list of translation/rotation operations that I execute in sequence each time the display is updated, but that becomes unwieldly very fast.

What I'd like to do is "collapse" a sequence of translations and rotations to a single translation followed by a single rotation.

Any recommendations/suggestions? I'm probably overthinking things, but it wouldn't be the first time.

Thanks in advance!