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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user