Set the fusion distance ratio to 1/300.0f to compensate for the coords
of the hang gliding database being so small, this allow the scene to be viewed in stereo and still look a convincing size.
This commit is contained in:
parent
7af174fadb
commit
564077643f
@ -75,6 +75,8 @@ void GliderManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
us.requestWarpPointer((ea.getXmin()+ea.getXmax())/2.0f,(ea.getYmin()+ea.getYmax())/2.0f);
|
||||
}
|
||||
|
||||
_camera->setFusionDistanceRatio(1/1000.0f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -130,16 +132,6 @@ bool GliderManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
us.requestContinuousUpdate(false);
|
||||
return true;
|
||||
}
|
||||
else if (ea.getKey()=='+')
|
||||
{
|
||||
_camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()*1.25f);
|
||||
return true;
|
||||
}
|
||||
else if (ea.getKey()=='-')
|
||||
{
|
||||
_camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()/1.25f);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
case(GUIEventAdapter::FRAME):
|
||||
@ -175,6 +167,7 @@ void GliderManipulator::addMouseEvent(const GUIEventAdapter& ea)
|
||||
bool GliderManipulator::calcMovement()
|
||||
{
|
||||
_camera->setFusionDistanceMode(osg::Camera::PROPORTIONAL_TO_SCREEN_DISTANCE);
|
||||
_camera->setFusionDistanceRatio(1/300.0f);
|
||||
|
||||
// return if less then two events have been added.
|
||||
if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user