Added support for basic viewer configuration files

This commit is contained in:
Robert Osfield
2007-09-21 15:34:25 +00:00
parent ece7b57df2
commit 3bfaee3654
7 changed files with 186 additions and 9 deletions

View File

@@ -34,6 +34,9 @@ class OSG_EXPORT View : public osg::Object
View(const osg::View& view, const osg::CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg,View);
/** Take all the settings, Camera and Slaves from the passed in view, leaving it empty. */
virtual void take(View& rhs);
/** Set the Stats object used for collect various frame related timing and scene graph stats.*/
void setStats(osg::Stats* stats) { _stats = stats; }

View File

@@ -35,6 +35,9 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
View(const osgViewer::View& view, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgViewer,View);
/** Take all the settings, Camera and Slaves from the passed in view, leaving it empty. */
virtual void take(osg::View& rhs);
virtual void setStartTick(osg::Timer_t tick);
osg::Timer_t getStartTick() const { return _startTick; }

View File

@@ -38,6 +38,9 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
META_Object(osgViewer,Viewer);
/** Take all the settings, Camera and Slaves from the passed in view(er), leaving it empty. */
virtual void take(View& rhs);
/** read the viewer configuration from a configuration file.*/
bool readConfiguration(const std::string& filename);