The CameraManipulator (like TrackballManipulator, for example) determines the default orientation. You can change this default by setting the up vector in the TrackballManipulator. By default, the TrackballManipulator uses positive Z up, so if your code is getting positive Y up, either you have a bug or you are not using the TrackballManipulator or you have changed its default. The default view position is also determined by the CameraManipulator. The TrackballManipulator, for example, has a home position that you can set. By default, it considers the scene bounding volume and tries to position the view so that the entire scene fits within a 50 degree FOV (I think it's 50, not sure). Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466
_____ From: [email protected] [mailto:[email protected]] On Behalf Of ami guru Sent: Wednesday, April 01, 2009 1:58 PM To: OpenSceneGraph Users Subject: [osg-users] default coordinate system and camera - newbie Hello forum, osgViewer , by default uses the world coordinate system that is oriented with positive X to right , positive Z up, and positive Y into the screen. Does that mean the camera' s defualt position is at the origin looking down into the screen which is positive Y? I have tried to extract the vectors using the function ************************' osg::Vec3f eye; osg::Vec3f dir; osg::Vec3f up; viewer.getCamera()->getViewMatrixAsLookAt(eye,dir,up); cout << "The eye vector: " << eye.x() << " " << eye.y() << " " << eye.z() << endl; cout << "The look at position: " << dir.x() << " " << dir.y() << " " << dir.z() << endl; cout << "The up vector is: " << up.x() << " " << up.y() << " " << up.z() << endl; ************************ The eye vector: 0 0 0 The look at position: 0 0 -1 The up vector is: 0 1 0 I was wondering if the up vector be Z axis instead Regards Sajjad
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

