On the osgplanet example, if I wanted to view any selected planet and
have it be my center of focus, while still being part of the overall
simulation, what would be the best way to do this?
 
 
1.  Attach a camera to every planet, and when selected pass the camera
to the main view.
    
        osgViewer::Viewer viewer;
        viewer->setSceneData(root);
 
        //after selecting planet
        viewer->setCamera(newPlanetCamera);
 
 
2. Point the default camera to the selected Planets
 
         osg::Vec3 eye( viewPoint->getX(), viewPoint->getY(),
viewPoint->getZ());
         osg::Vec3 center(0,0,0);
         osg::Vec3 up(0,0,5000000);
         viewer->getCamera()->setViewMatrixAsLookAt(eye,center,up);
 
 
3. Is their a better way to do this?  Any examples?
 
 
 
Thank you
        
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to