-
-// we need some static storage space for these values. However, we
-// can't store it in a renderer class object because the functions
-// that manipulate these are static. They are static so they can
-// interface to the display callback system. There's probably a
-// better way, there has to be a better way, but I'm not seeing it
-// right now.
-static float fov_width = 55.0;
-static float fov_height = 42.0;
-static float fov_near = 1.0;
-static float fov_far = 1000.0;
-
-
-/** FlightGear code should use this routine to set the FOV rather than
- * calling the ssg routine directly
- */
-void FGRenderer::setFOV( float w, float h ) {
- fov_width = w;
- fov_height = h;
- osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
- viewer->getCamera()->setProjectionMatrixAsPerspective(fov_height, 4.0/3.0,
- fov_near, fov_far);
-}
-
-
-/** FlightGear code should use this routine to set the Near/Far clip
- * planes rather than calling the ssg routine directly
- */
-void FGRenderer::setNearFar( float n, float f ) {
-// OSGFIXME: we have currently too much z-buffer fights
-n = 0.1;
- fov_near = n;
- fov_far = f;
- osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
- viewer->getCamera()->setProjectionMatrixAsPerspective(fov_height, 4.0/3.0,
- fov_near, fov_far);
-}
-