Introduced new user object support into osg::Object that allows assignment of a list of user objects to an osg::Object.

Refactored original UserData and Descriptions strings to be managed alongside the new user object suppport within
a single osg::Object::UserDataContainer.
This commit is contained in:
Robert Osfield
2011-06-02 22:04:08 +00:00
parent 4103319059
commit c703f39459
7 changed files with 535 additions and 46 deletions

View File

@@ -304,31 +304,6 @@ class OSG_EXPORT Node : public Object
/** A vector of std::string's which are used to describe the object.*/
typedef std::vector<std::string> DescriptionList;
/** Set the description list of the node.*/
inline void setDescriptions(const DescriptionList& descriptions) { _descriptions=descriptions; }
/** Get the description list of the node.*/
inline DescriptionList& getDescriptions() { return _descriptions; }
/** Get the const description list of the const node.*/
inline const DescriptionList& getDescriptions() const { return _descriptions; }
/** Get a single const description of the const node.*/
inline const std::string& getDescription(unsigned int i) const { return _descriptions[i]; }
/** Get a single description of the node.*/
inline std::string& getDescription(unsigned int i) { return _descriptions[i]; }
/** Get the number of descriptions of the node.*/
inline unsigned int getNumDescriptions() const { return static_cast<unsigned int>(_descriptions.size()); }
/** Add a description string to the node.*/
void addDescription(const std::string& desc) { _descriptions.push_back(desc); }
/** Set the node's StateSet.*/
void setStateSet(osg::StateSet* stateset);
@@ -453,8 +428,6 @@ class OSG_EXPORT Node : public Object
void setNumChildrenWithOccluderNodes(unsigned int num);
NodeMask _nodeMask;
DescriptionList _descriptions;
ref_ptr<StateSet> _stateset;