[osg-users] PositionAttitudeTransform - How do I make a rotation
Hi, I'm kind of newbie in 3D developpment and in openSceneGraph. I want to rotate a node using PositionAttitudeTransform::setAttitude but I don't know how to do that. I've tried to make it rotate according ti the fact that x, y and z of the Quat is the coordinate of the vector from the origin (x, x, z) plus an angle (w). But the node has a strange behavior. Can anyone help me? Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9612#9612 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PositionAttitudeTransform - How do I make a rotation
Hi, have a look at the quaternion/Matrix member functions, e.g. makeRotate. Do not try to set the quat internal values directly. E.g. you can make a quat/Matrix from roll, pitch and yaw with three angles and 3 axes. go here: http://news.gmane.org/gmane.comp.graphics.openscenegraph.user and search for roll pitch yaw makeRotate and you'll see some examples. jp Adrien Joly wrote: Hi, I'm kind of newbie in 3D developpment and in openSceneGraph. I want to rotate a node using PositionAttitudeTransform::setAttitude but I don't know how to do that. I've tried to make it rotate according ti the fact that x, y and z of the Quat is the coordinate of the vector from the origin (x, x, z) plus an angle (w). But the node has a strange behavior. Can anyone help me? Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9612#9612 ___ osg-users mailing list osg-users@lists.openscenegraph.org 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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PositionAttitudeTransform - How do I make a rotation
Look through the examples in the OSG src and also look through the tuorials on the Web site, you will find code that's shows you how to do this Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Adrien Joly Sent: Thursday, April 02, 2009 5:39 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] PositionAttitudeTransform - How do I make a rotation Hi, I'm kind of newbie in 3D developpment and in openSceneGraph. I want to rotate a node using PositionAttitudeTransform::setAttitude but I don't know how to do that. I've tried to make it rotate according ti the fact that x, y and z of the Quat is the coordinate of the vector from the origin (x, x, z) plus an angle (w). But the node has a strange behavior. Can anyone help me? Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9612#9612 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PositionAttitudeTransform - How do I make a rotation
Thank you for the answers. I finally found, thanks to you, how to make it work ! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9657#9657 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org