Added support for automatically finding CoordinateSystemNode's in the

scene graph and then using them to set up the CoordinateFrame used
by the camera manipulators.
This commit is contained in:
Robert Osfield
2004-05-03 12:04:25 +00:00
parent 04798b4e63
commit b7746ff56e
6 changed files with 100 additions and 27 deletions

View File

@@ -85,23 +85,9 @@ int main( int argc, char **argv )
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get());
#if 0
osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode;
csn->addChild(loadedModel.get());
csn->setEllipsoidModel(new osg::EllipsoidModel());
osg::NodePath nodepath;
nodepath.push_back(csn);
viewer.setCoordindateSystemNodePath(nodepath);
// set the scene to render
viewer.setSceneData(csn);
#else
// pass the loaded scene graph to the viewer.
viewer.setSceneData(loadedModel.get());
#endif
// create the windows and run the threads.
viewer.realize();