Added back in Switch::removeChild(Node*)

This commit is contained in:
Robert Osfield
2005-12-16 11:04:33 +00:00
parent 101e5fac53
commit 4535cc0c09
3 changed files with 8 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ class OSG_EXPORT Switch : public Group
virtual bool insertChild( unsigned int index, Node *child, bool value );
virtual bool removeChild( Node *child );
virtual bool removeChild(unsigned int pos,unsigned int numChildrenToRemove=1);

View File

@@ -99,6 +99,11 @@ bool Switch::insertChild( unsigned int index, Node *child, bool value )
return false;
}
bool Switch::removeChild( Node *child )
{
removeChild( getChildIndex(child) );
}
bool Switch::removeChild(unsigned int pos,unsigned int numChildrenToRemove)
{
if (pos>=_values.size() || numChildrenToRemove==0) return false;

View File

@@ -43,6 +43,7 @@ BEGIN_OBJECT_REFLECTOR(osg::Switch)
I_Method2(bool, addChild, IN, osg::Node *, child, IN, bool, value);
I_Method2(bool, insertChild, IN, unsigned int, index, IN, osg::Node *, child);
I_Method3(bool, insertChild, IN, unsigned int, index, IN, osg::Node *, child, IN, bool, value);
I_Method1(bool, removeChild, IN, osg::Node *, child);
I_MethodWithDefaults2(bool, removeChild, IN, unsigned int, pos, , IN, unsigned int, numChildrenToRemove, 1);
I_Method2(void, setValue, IN, unsigned int, pos, IN, bool, value);
I_Method1(bool, getValue, IN, unsigned int, pos);