Added a osgViewer::setSceneData(ref_ptr<Node>) method.

This commit is contained in:
Robert Osfield
2007-12-12 17:59:06 +00:00
parent 213a370c25
commit 6cca3b8f49
3 changed files with 16 additions and 9 deletions

View File

@@ -60,7 +60,10 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
const Scene* getScene() const { return _scene.get(); }
/** Set the scene graph that the View will use.*/
virtual void setSceneData(osg::Node* node);
inline void setSceneData(osg::Node* node) { setSceneData(osg::ref_ptr<osg::Node>(node)); }
/** Set the scene graph that the View will use.*/
virtual void setSceneData(osg::ref_ptr<osg::Node> node);
/** Get the View's scene graph.*/
osg::Node* getSceneData() { return _scene.valid() ? _scene->getSceneData() : 0; }