]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/renderer.hxx
Tim MOORE: addCamera() method (needed by og_gauge)
[flightgear.git] / src / Main / renderer.hxx
index b80087da6b8e1ff8fd0b1c6b11050227447a14ec..3fb7e0f83da8a35fe00c8ab7521ea52d0e0b02d5 100644 (file)
@@ -6,6 +6,11 @@
 #include <simgear/scene/sky/sky.hxx>
 #include <simgear/scene/util/SGPickCallback.hxx>
 
+#include <osg/Camera>
+#include <osgViewer/Viewer>
+
+#include "FGManipulator.hxx"
+
 #define FG_ENABLE_MULTIPASS_CLOUDS 1
 
 class SGSky;
@@ -24,6 +29,7 @@ public:
     FGRenderer();
     ~FGRenderer();
 
+    void splashinit();
     void init();
 
     static void resize(int width, int height );
@@ -49,7 +55,31 @@ public:
     /** Just pick into the scene and return the pick callbacks on the way ...
      */
     static bool pick( unsigned x, unsigned y,
-                      std::vector<SGSceneryPick>& pickList );
+                      std::vector<SGSceneryPick>& pickList,
+                      const osgGA::GUIEventAdapter* ea );
+
+    /** Get and set the OSG Viewer object, if any.
+     */
+    osgViewer::Viewer* getViewer() { return viewer.get(); }
+    const osgViewer::Viewer* getViewer() const { return viewer.get(); }
+    void setViewer(osgViewer::Viewer* viewer) { this->viewer = viewer; }
+    /** Get and set the manipulator object, if any.
+     */
+    FGManipulator* getManipulator() { return manipulator.get(); }
+    const FGManipulator* getManipulator() const { return manipulator.get(); }
+    void setManipulator(FGManipulator* manipulator) {
+        this->manipulator = manipulator;
+    }
+
+    /** Add a top level camera.
+    */
+    void addCamera(osg::Camera* camera, bool useSceneData);
+
+protected:
+    osg::ref_ptr<osgViewer::Viewer> viewer;
+    osg::ref_ptr<FGManipulator> manipulator;
 };
 
+bool fgDumpSceneGraphToFile(const char* filename);
+
 #endif