Changed StateSet::ParentList from vector<Object*> to vector<Node*> to reflect that Drawable is now a Node.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14420 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
beeda386ef
commit
6126379362
@ -65,7 +65,7 @@ class OSG_EXPORT StateSet : public Object
|
||||
|
||||
|
||||
/** A vector of osg::Object pointers which is used to store the parent(s) of this Stateset, the parents could be osg::Node or osg::Drawable.*/
|
||||
typedef std::vector<Object*> ParentList;
|
||||
typedef std::vector<Node*> ParentList;
|
||||
|
||||
/** Get the parent list of this StateSet. */
|
||||
inline const ParentList& getParents() const { return _parents; }
|
||||
@ -74,13 +74,13 @@ class OSG_EXPORT StateSet : public Object
|
||||
* prevent modification of the parent list.*/
|
||||
inline ParentList getParents() { return _parents; }
|
||||
|
||||
inline Object* getParent(unsigned int i) { return _parents[i]; }
|
||||
inline Node* getParent(unsigned int i) { return _parents[i]; }
|
||||
/**
|
||||
* Get a single const parent of this StateSet.
|
||||
* @param i index of the parent to get.
|
||||
* @return the parent i.
|
||||
*/
|
||||
inline const Object* getParent(unsigned int i) const { return _parents[i]; }
|
||||
inline const Node* getParent(unsigned int i) const { return _parents[i]; }
|
||||
|
||||
/**
|
||||
* Get the number of parents of this StateSet.
|
||||
@ -458,8 +458,8 @@ class OSG_EXPORT StateSet : public Object
|
||||
|
||||
StateSet& operator = (const StateSet&) { return *this; }
|
||||
|
||||
void addParent(osg::Object* object);
|
||||
void removeParent(osg::Object* object);
|
||||
void addParent(osg::Node* object);
|
||||
void removeParent(osg::Node* object);
|
||||
|
||||
ParentList _parents;
|
||||
friend class osg::Node;
|
||||
|
@ -93,7 +93,7 @@ void NodeVisitor::apply(Node& node)
|
||||
|
||||
void NodeVisitor::apply(Geode& node)
|
||||
{
|
||||
apply(static_cast<Node&>(node));
|
||||
apply(static_cast<Group&>(node));
|
||||
}
|
||||
|
||||
void NodeVisitor::apply(Billboard& node)
|
||||
|
@ -273,7 +273,7 @@ void StateSet::computeDataVariance()
|
||||
}
|
||||
|
||||
|
||||
void StateSet::addParent(osg::Object* object)
|
||||
void StateSet::addParent(osg::Node* object)
|
||||
{
|
||||
// OSG_DEBUG_FP<<"Adding parent"<<std::endl;
|
||||
OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex());
|
||||
@ -281,7 +281,7 @@ void StateSet::addParent(osg::Object* object)
|
||||
_parents.push_back(object);
|
||||
}
|
||||
|
||||
void StateSet::removeParent(osg::Object* object)
|
||||
void StateSet::removeParent(osg::Node* object)
|
||||
{
|
||||
OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user