]> git.mxchange.org Git - flightgear.git/blob - src/Main/renderer.hxx
Remove now unused functions.
[flightgear.git] / src / Main / renderer.hxx
1
2 #ifndef __FG_RENDERER_HXX
3 #define __FG_RENDERER_HXX 1
4
5 #include <simgear/screen/extensions.hxx>
6 #include <simgear/scene/util/SGPickCallback.hxx>
7
8 #include <osg/ref_ptr>
9
10 namespace osg
11 {
12 class Camera;
13 class Group;
14 }
15
16 namespace osgGA
17 {
18 class GUIEventAdapter;
19 }
20
21 namespace osgShadow
22 {
23 class ShadowedScene;
24 }
25
26 namespace osgViewer
27 {
28 class Viewer;
29 }
30
31 namespace flightgear
32 {
33 class FGEventHandler;
34 }
35
36 #define FG_ENABLE_MULTIPASS_CLOUDS 1
37
38 class SGSky;
39 extern SGSky *thesky;
40
41 class FGRenderer {
42
43 public:
44
45     FGRenderer();
46     ~FGRenderer();
47
48     void splashinit();
49     void init();
50
51     static void resize(int width, int height );
52
53     // calling update( refresh_camera_settings = false ) will not
54     // touch window or camera settings.  This is useful for the tiled
55     // renderer which needs to set the view frustum itself.
56     static void update( bool refresh_camera_settings );
57     inline static void update() { update( true ); }
58
59     /** Just pick into the scene and return the pick callbacks on the way ...
60      */
61     static bool pick( std::vector<SGSceneryPick>& pickList,
62                       const osgGA::GUIEventAdapter* ea );
63
64     /** Get and set the OSG Viewer object, if any.
65      */
66     osgViewer::Viewer* getViewer() { return viewer.get(); }
67     const osgViewer::Viewer* getViewer() const { return viewer.get(); }
68     void setViewer(osgViewer::Viewer* viewer);
69     /** Get and set the manipulator object, if any.
70      */
71     flightgear::FGEventHandler* getEventHandler() { return eventHandler.get(); }
72     const flightgear::FGEventHandler* getEventHandler() const { return eventHandler.get(); }
73     void setEventHandler(flightgear::FGEventHandler* manipulator);
74
75     /** Add a top level camera.
76     */
77     void addCamera(osg::Camera* camera, bool useSceneData);
78
79 protected:
80     osg::ref_ptr<osgViewer::Viewer> viewer;
81     osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
82 };
83
84 bool fgDumpSceneGraphToFile(const char* filename);
85 bool fgDumpTerrainBranchToFile(const char* filename);
86
87 #endif