Re: [osg-users] Two rotations on an object?

2010-02-16 Thread Jason Daly
Ernie Smethurst wrote: Code: PositionAttitudeTransform *rotate_planetFive = new PositionAttitudeTransform; rotate_planetFive-addChild( geode_planetFive ); rotate_planetFive-setUpdateCallback( new AnimationPathCallback(osg::Vec3(0,0,0), osg::Z_AXIS, inDegrees(45.0f)) ); //ROTATE AROUND THE SUN

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst
a chain of PAT Notes I'm not really sure what PAT notes are, I've checked the OSG quick start guide and cant see anything regarding PAT Notes. Thanks for any input. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24182#24182

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Torben Dannhauer
Hi, ups... ;) I have corrected it. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24185#24185 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst
Thanks for pointing me toward the PositonAttidudeTransform class. Below is what im trying: Code: MatrixTransform *rotate_planetFive = new MatrixTransform; rotate_planetFive-addChild( geode_planetFive ); rotate_planetFive-setUpdateCallback( new AnimationPathCallback(osg::Vec3(2.0f, 0.0f,

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread R Fritz
1. Put your sun at the origin of world co-ordinates. 2. Put the planet at the origin. Make its axis of rotation the z axis. 3. Use a rotate transform to rotate it around its axis. (You've got this part.) 4. Translate the planet along the x axis, to its orbital radius. 5. Use a rotation around the

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Jason Daly
R Fritz wrote: 1. Put your sun at the origin of world co-ordinates. 2. Put the planet at the origin. Make its axis of rotation the z axis. 3. Use a rotate transform to rotate it around its axis. (You've got this part.) 4. Translate the planet along the x axis, to its orbital radius. 5. Use a

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Tomlinson, Gordon
: Monday, February 15, 2010 6:26 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Two rotations on an object? R Fritz wrote: 1. Put your sun at the origin of world co-ordinates. 2. Put the planet at the origin. Make its axis of rotation the z axis. 3. Use a rotate transform to rotate it around its

Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst
Thank you all for your replies, Much appreciated. I understand about how 3D graphics works in regards to coordinate systems and such and i understand how I want the scene to act and work, its just getting the code to actually make this happen. Going about applying the two transforms to my

[osg-users] Two rotations on an object?

2010-02-14 Thread Ernie Smethurst
So i am learning to use OSG and am currently learning the basics and am currently creating little scenes to help me understand how it all works and such. I am trying to create a scene of a planetary system, using textures, lighting and primitives and am currently stuck with a problem that I

Re: [osg-users] Two rotations on an object?

2010-02-14 Thread Torben Dannhauer
Hi, you could to it as a chain of PAT Notes 1. rotate to the desired angle of the planet around sun 2. translate the planet to add you desired radius 3. Rotate the plane to rotate it around it own axis. Cheers, Torben -- Read this topic online here: