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