Updates to osgProducer and osgstereoimage for stereo support.

Changed the default distance from the scene of the home position of the
trackball and flight manipulators.
This commit is contained in:
Robert Osfield 2003-03-20 17:00:32 +00:00
parent 0476348a0c
commit fe49a97baa
5 changed files with 9 additions and 3 deletions

View File

@ -100,6 +100,11 @@ int main( int argc, char **argv )
// set the scene to render
viewer.setSceneData(rootNode.get());
// set up the use of stereo by default.
osg::DisplaySettings* ds = viewer.getDisplaySettings();
if (!ds) ds = osg::DisplaySettings::instance();
if (ds) ds->setStereo(true);
// create the windows and run the threads.
viewer.realize(Producer::CameraGroup::ThreadPerCamera);

View File

@ -50,7 +50,7 @@ void FlightManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us)
const osg::BoundingSphere& boundingSphere=_node->getBound();
_camera->setLookAt(
boundingSphere._center+osg::Vec3( 0.0,-3.0f * boundingSphere._radius,0.0f),
boundingSphere._center+osg::Vec3( 0.0,-3.5f * boundingSphere._radius,0.0f),
boundingSphere._center,
osg::Vec3(0.0f,0.0f,1.0f));

View File

@ -50,7 +50,7 @@ void TrackballManipulator::home(const GUIEventAdapter& ,GUIActionAdapter& us)
const osg::BoundingSphere& boundingSphere=_node->getBound();
_camera->setView(boundingSphere._center+osg::Vec3( 0.0,-3.0f * boundingSphere._radius,0.0f),
_camera->setView(boundingSphere._center+osg::Vec3( 0.0,-3.5f * boundingSphere._radius,0.0f),
boundingSphere._center,
osg::Vec3(0.0f,0.0f,1.0f));

View File

@ -269,6 +269,7 @@ void OsgCameraGroup::realize( ThreadingModel thread_model)
// set up the visual chooser.
if (_ds.valid() || numMultiSamples!=0)
{
Producer::VisualChooser* rs_vc = rs->getVisualChooser();
if (!rs_vc)
{

View File

@ -205,8 +205,8 @@ void Viewer::realize( ThreadingModel thread_model)
for(SceneHandlerList::iterator p=_shvec.begin(); p!=_shvec.end(); p++ )
{
(*p)->getState()->setAbortRenderingPtr(&_done);
(*p)->setCamera(_old_style_osg_camera.get());
}
OsgCameraGroup::sync();
}