Moved get/setUserData from osg::Node into its superclass osg::Object to
allow other subclasses to add their own custom data.
This commit is contained in:
@@ -33,7 +33,6 @@ Node::Node(const Node& node,const CopyOp& copyop):
|
||||
_cullingActive(node._cullingActive),
|
||||
_numChildrenWithCullingDisabled(0), // assume no children yet.
|
||||
_numChildrenWithOccluderNodes(0),
|
||||
_userData(copyop(node._userData.get())),
|
||||
_nodeMask(node._nodeMask),
|
||||
_descriptions(node._descriptions),
|
||||
_dstate(copyop(node._dstate.get()))
|
||||
|
||||
@@ -14,6 +14,7 @@ Referenced::~Referenced()
|
||||
}
|
||||
|
||||
|
||||
Object::Object(const Object& obj,const CopyOp&):
|
||||
Object::Object(const Object& obj,const CopyOp& copyop):
|
||||
Referenced(),
|
||||
_dataVariance(obj._dataVariance) {}
|
||||
_dataVariance(obj._dataVariance),
|
||||
_userData(copyop(obj._userData.get())) {}
|
||||
|
||||
@@ -53,7 +53,7 @@ bool Geode_writeLocalData(const osg::Object& obj, Output& fw)
|
||||
|
||||
fw.indent() << "num_drawables " << geode.getNumDrawables() << std::endl;
|
||||
|
||||
for(int i=0;i<geode.getNumDrawables();++i)
|
||||
for(unsigned int i=0;i<geode.getNumDrawables();++i)
|
||||
{
|
||||
fw.writeObject(*geode.getDrawable(i));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user