Aeluned
04-26-2007, 05:44 AM
I've added quaternions to my application for the benefits they offer.
I have a problem however that I can't quite figure out.
My application needs to set keyframes with rotational values greater than 360.
I'm currently relying on extracting the Euler angles from the quaternion defining my rotation before and after any rotation is done with the mouse. This gives me the delta of how much rotation was done along what axis and the idea is to add this delta to the key frame value of the rotation along that axis.
The problem with this method is that quaternions will suddenly do a rotation of 180 on some axis from time to time and also never return a representation of a rotation with a value greater than 360 (actually I think it's more like -180 to 180).
As you can tell from my post, I'm no quaternion expert...what's a simple way to use quaternions and also track rotations so I can properly set keyframes (much like is done in 3D Studio Max)?
I hope at least some of that came across clearly.
I'd greatly appreciate any help on this, thanks.
I have a problem however that I can't quite figure out.
My application needs to set keyframes with rotational values greater than 360.
I'm currently relying on extracting the Euler angles from the quaternion defining my rotation before and after any rotation is done with the mouse. This gives me the delta of how much rotation was done along what axis and the idea is to add this delta to the key frame value of the rotation along that axis.
The problem with this method is that quaternions will suddenly do a rotation of 180 on some axis from time to time and also never return a representation of a rotation with a value greater than 360 (actually I think it's more like -180 to 180).
As you can tell from my post, I'm no quaternion expert...what's a simple way to use quaternions and also track rotations so I can properly set keyframes (much like is done in 3D Studio Max)?
I hope at least some of that came across clearly.
I'd greatly appreciate any help on this, thanks.