diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index b4dcbc9e7..87e8932c1 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -1048,7 +1048,14 @@ FGRenderer::pick( unsigned x, unsigned y, } } -bool fgDumpSceneGraphToFile(const char* filename) +void +FGRenderer::addCamera(osg::Camera* camera, bool useSceneData) +{ + mRealRoot->addChild(camera); +} + +bool +fgDumpSceneGraphToFile(const char* filename) { return osgDB::writeNodeFile(*mRealRoot.get(), filename); } diff --git a/src/Main/renderer.hxx b/src/Main/renderer.hxx index ea14d3534..3fb7e0f83 100644 --- a/src/Main/renderer.hxx +++ b/src/Main/renderer.hxx @@ -6,6 +6,7 @@ #include #include +#include #include #include "FGManipulator.hxx" @@ -66,10 +67,14 @@ public: */ FGManipulator* getManipulator() { return manipulator.get(); } const FGManipulator* getManipulator() const { return manipulator.get(); } - void setManipulator(FGManipulator* manipulator) - { - this->manipulator = manipulator; - } + void setManipulator(FGManipulator* manipulator) { + this->manipulator = manipulator; + } + + /** Add a top level camera. + */ + void addCamera(osg::Camera* camera, bool useSceneData); + protected: osg::ref_ptr viewer; osg::ref_ptr manipulator;