From Karl Heijdenberg, moved set/getFrameStamp() from osgViewer::View to osg::View.

This commit is contained in:
Robert Osfield 2007-12-11 16:34:37 +00:00
parent be5f709bdb
commit ffab16ba2f
2 changed files with 16 additions and 10 deletions

View File

@ -71,6 +71,15 @@ class OSG_EXPORT View : public virtual osg::Object
/** Get the const master camera of the view. */
const osg::Camera* getCamera() const { return _camera.get(); }
/** Set the frame stamp of the view. */
void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; }
/** Get the frame stamp of the view. */
osg::FrameStamp* getFrameStamp() { return _frameStamp.get(); }
/** Get the frame stamp of the view. */
const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); }
/** Slave allows one to up a camera that follows the master with a local offset to the project and view matrices.*/
struct Slave
{
@ -130,13 +139,15 @@ class OSG_EXPORT View : public virtual osg::Object
virtual osg::GraphicsOperation* createRenderer(osg::Camera*) { return 0; }
LightingMode _lightingMode;
osg::ref_ptr<osg::Light> _light;
LightingMode _lightingMode;
osg::ref_ptr<osg::Light> _light;
osg::ref_ptr<osg::Camera> _camera;
osg::ref_ptr<osg::Camera> _camera;
typedef std::vector<Slave> Slaves;
Slaves _slaves;
typedef std::vector<Slave> Slaves;
Slaves _slaves;
osg::ref_ptr<osg::FrameStamp> _frameStamp;
};
}

View File

@ -56,10 +56,6 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
virtual void setStartTick(osg::Timer_t tick);
osg::Timer_t getStartTick() const { return _startTick; }
void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; }
osg::FrameStamp* getFrameStamp() { return _frameStamp.get(); }
const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); }
Scene* getScene() { return _scene.get(); }
const Scene* getScene() const { return _scene.get(); }
@ -207,7 +203,6 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
osg::Timer_t _startTick;
osg::ref_ptr<osg::FrameStamp> _frameStamp;
osg::ref_ptr<osgViewer::Scene> _scene;
osg::ref_ptr<osgGA::EventQueue> _eventQueue;