}
}
-void FGRenderer::setCameraParameters(float vfov, float aspectRatio,
- float zNear, float zFar)
-{
- zNear = .1;
- osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
- viewer->getCamera()->setProjectionMatrixAsPerspective(vfov,
- 1.0f / aspectRatio,
- zNear, zFar);
-
-}
bool
FGRenderer::pick(std::vector<SGSceneryPick>& pickList,
const osgGA::GUIEventAdapter* ea)
class SGSky;
extern SGSky *thesky;
-extern glPointParameterfProc glPointParameterfPtr;
-extern glPointParameterfvProc glPointParameterfvPtr;
-extern bool glPointParameterIsSupported;
-extern bool glPointSpriteIsSupported;
-
-
class FGRenderer {
public:
static void update( bool refresh_camera_settings );
inline static void update() { update( true ); }
- /** Set all the camera parameters at once. aspectRatio is height / width.
- */
- static void setCameraParameters(float vfov, float aspectRatio,
- float zNear, float zFar);
/** Just pick into the scene and return the pick callbacks on the way ...
*/
static bool pick( std::vector<SGSceneryPick>& pickList,