From David Callu, added getOrCreateScene method, made contractors protected.
From Robert Osfield, made getOrCreateScene protected and made View a friend of Scene to all it to construct Scene objects itself.
This commit is contained in:
@@ -29,9 +29,6 @@ class OSGVIEWER_EXPORT Scene : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
Scene();
|
||||
virtual ~Scene();
|
||||
|
||||
void setSceneData(osg::Node* node);
|
||||
osg::Node* getSceneData();
|
||||
const osg::Node* getSceneData() const;
|
||||
@@ -44,8 +41,16 @@ class OSGVIEWER_EXPORT Scene : public osg::Referenced
|
||||
* return 0 if no Scene has yet been assigned the specified node.*/
|
||||
static Scene* getScene(osg::Node* node);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
Scene();
|
||||
virtual ~Scene();
|
||||
|
||||
/** Get the Scene object that has the specified node assigned to it.
|
||||
* or return a new Scene if no Scene has yet been assigned the specified node.*/
|
||||
static Scene* getOrCreateScene(osg::Node* node);
|
||||
|
||||
friend class View;
|
||||
|
||||
osg::ref_ptr<osg::Node> _sceneData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user