Hi,
On 11/10/10 18:23, Matt Caron wrote:
How can I get and set a rotation about a specific axis from a
qauternion?
I have a quaternion rotated arbitrarily in 3D space, but I would like
to inspect its rotation about the global z-axis, then after
inspection I would like to be able to set that rotation. I suppose
to set it I could just add the difference between the current
rotation and the final rotation, but to do this I still need to be
able to inspect the z-rotation initially.
if the rotation is arbitray, it can also be split up into rotations
about arbitray axes in arbitrary orders. So, there is no fixed way to
split it up, it will depend on how you use it.
If you are building up your final quat using rotations about XYZ in a
certain order, it's easier to keep them separate and just combine before
use. If you are using "through the lens" (i.e. rotating from the POV of
the object) control you can just multiply the new rotation with the current.
jp
Thanks.
Matt
------------------ Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32622#32622
_______________________________________________ osg-users mailing
list [email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org