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 cant quite work 
out, How to apply to rotations to a sphere. As it is a planet that I am trying 
to model it will rotate around its own axis and also rotate around a central 
sun. 

Below is what i use to get the planet to rotate around its own axis:

Code:

MatrixTransform *moon_Rotate = new MatrixTransform;
moon_Rotate->addChild( geode_moon);
moon_Rotate->setUpdateCallback( new AnimationPathCallback(osg::Vec3(0, 0, 0), 
osg::Z_AXIS, inDegrees(25.0f)) );




This works successfully, but how would I then add a second rotation to make it 
rotate around another sphere that I have created?

Thanks for any input.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=24150#24150





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to