Changed the Node::ParentList to be a list of osg::Node rather than osg::Group, and added addChild, removeChild, replaceChild virtual method to Node to enable code
to user code compile with minimal modifications to account for the new change to the Node ParentList.
This commit is contained in:
@@ -145,6 +145,20 @@ bool Group::insertChild( unsigned int index, Node *child )
|
||||
else return false;
|
||||
}
|
||||
|
||||
unsigned int Group::getNumChildren() const
|
||||
{
|
||||
return static_cast<unsigned int>(_children.size());
|
||||
}
|
||||
|
||||
|
||||
bool Group::removeChild( Node *child )
|
||||
{
|
||||
unsigned int pos = getChildIndex(child);
|
||||
if (pos<_children.size()) return removeChildren(pos,1);
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
bool Group::removeChildren(unsigned int pos,unsigned int numChildrenToRemove)
|
||||
{
|
||||
if (pos<_children.size() && numChildrenToRemove>0)
|
||||
|
||||
Reference in New Issue
Block a user