Hello Mukund,
r.makeRotate( rot += 10, osg::Vec3( 1., 0., 0. ) );
The angle should be in radians. I think your code above assumes it's in
degrees.
What are you expecting to see BTW? The camera might rotate around the
scene's origin (since your view matrix has no translation), but what is
in your scene? If your object is also at the scene origin, perhaps your
camera ends up inside the object, and thus you don't see any rotation
because you don't see any object (so you have no visual frame of
reference to see if there's any rotation)?
If you use the plain osgViewer, you will be able to use a camera
manipulator. Using glut, if you want to use a camera manipulator, you
need to make sure you're forwarding all events (keyboard, mouse)
correctly from glut to the OSG event queue. Why do you insist on using
glut to learn OSG? Using the plain viewer is even easier:
int main(int argc, char** argv)
{
osg::Node* root = osgDB::readNodeFile("cow.osg");
osgViewer::Viewer viewer;
viewer.setSceneData(root);
return viewer.run();
// or while(!viewer.done()) { viewer.frame(); }
}
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org