Moved the managing of frame stamp from osgProducer::Viewer into

osgProducer::OsgCamaraGroup.

Added setting of trackball in osgcameragroup so its starts in the
correct place for different models.
This commit is contained in:
Robert Osfield
2003-04-17 11:14:25 +00:00
parent f759f7e69e
commit fd262554ac
6 changed files with 28 additions and 25 deletions

View File

@@ -146,8 +146,13 @@ int main( int argc, char **argv )
// set the scene to render
cg.setSceneData(loadedModel.get());
const osg::BoundingSphere& bs = loadedModel->getBound();
Producer::Trackball tb;
tb.setOrientation( Producer::Trackball::Z_UP );
tb.setDistance(bs.radius()*3.0f);
tb.translate(-bs.center().x(),-bs.center().y(),-bs.center().z());
// create the windows and run the threads.
cg.realize();