2 #ifndef __FG_RENDERER_HXX
3 #define __FG_RENDERER_HXX 1
5 #include <simgear/scene/util/SGPickCallback.hxx>
6 #include <simgear/props/props.hxx>
18 class GUIEventAdapter;
49 void resize(int width, int height );
51 // calling update( refresh_camera_settings = false ) will not
52 // touch window or camera settings. This is useful for the tiled
53 // renderer which needs to set the view frustum itself.
54 void update( bool refresh_camera_settings);
57 /** Just pick into the scene and return the pick callbacks on the way ...
59 bool pick( std::vector<SGSceneryPick>& pickList,
60 const osgGA::GUIEventAdapter* ea );
62 /** Get and set the OSG Viewer object, if any.
64 osgViewer::Viewer* getViewer() { return viewer.get(); }
65 const osgViewer::Viewer* getViewer() const { return viewer.get(); }
66 void setViewer(osgViewer::Viewer* viewer);
67 /** Get and set the manipulator object, if any.
69 flightgear::FGEventHandler* getEventHandler() { return eventHandler.get(); }
70 const flightgear::FGEventHandler* getEventHandler() const { return eventHandler.get(); }
71 void setEventHandler(flightgear::FGEventHandler* manipulator);
73 /** Add a top level camera.
75 void addCamera(osg::Camera* camera, bool useSceneData);
78 osg::ref_ptr<osgViewer::Viewer> viewer;
79 osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
80 SGPropertyNode_ptr _scenery_loaded,_scenery_override;
81 SGPropertyNode_ptr _skyblend;
82 SGPropertyNode_ptr _point_sprites, _enhanced_lighting, _distance_attenuation;
83 SGPropertyNode_ptr _textures;
84 SGPropertyNode_ptr _cloud_status, _visibility_m;
85 SGPropertyNode_ptr _xsize, _ysize;
86 SGPropertyNode_ptr _panel_hotspots, _sim_delta_sec, _horizon_effect, _altitude_ft;
87 SGPropertyNode_ptr _virtual_cockpit;
88 bool _splash_screen_active;
91 bool fgDumpSceneGraphToFile(const char* filename);
92 bool fgDumpTerrainBranchToFile(const char* filename);
96 bool printVisibleSceneInfo(FGRenderer* renderer);