84 inline bool removeChild(
unsigned int pos,
unsigned int numChildrenToRemove=1 )
92 virtual bool removeChildren(
unsigned int pos,
unsigned int numChildrenToRemove);
126 for (NodeList::const_iterator itr=
_children.begin();
130 if (itr->get()==node)
return true;
143 for (
unsigned int childNum=0;childNum<
_children.size();++childNum)
145 if (
_children[childNum]==node)
return childNum;
147 return static_cast<unsigned int>(
_children.size());
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
std::vector< ref_ptr< Node > > NodeList
Definition Group:22
BoundingSphered BoundingSphere
Definition BoundingSphere:308
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
virtual BoundingSphere computeBound() const
Compute the bounding sphere around Node's geometry or children.
virtual void childInserted(unsigned int)
Definition Group:168
Node * getChild(unsigned int i)
Return child node at position i.
Definition Group:117
virtual void childRemoved(unsigned int, unsigned int)
Definition Group:167
virtual void traverse(NodeVisitor &nv)
Traverse downwards : calls children's accept method with NodeVisitor.
virtual const Group * asGroup() const
convert 'const this' into a const Group pointer if Node is a Group, otherwise return 0.
Definition Group:41
virtual bool removeChildren(unsigned int pos, unsigned int numChildrenToRemove)
Remove children from Group.
bool removeChild(const ref_ptr< T > &child)
Definition Group:74
virtual bool setChild(unsigned int i, Node *node)
Set child node at position i.
virtual bool replaceChild(Node *origChild, Node *newChild)
Replace specified child Node with another Node.
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
virtual unsigned int getNumChildren() const
Return the number of children nodes.
bool insertChild(unsigned int index, const ref_ptr< T > &child)
Definition Group:62
const Node * getChild(unsigned int i) const
Return child node at position i.
Definition Group:120
Group(const Group &, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual void setThreadSafeRefUnref(bool threadSafe)
Set whether to use a mutex to ensure ref() and unref() are thread safe.
virtual bool insertChild(unsigned int index, Node *child)
Insert Node to Group at specific location.
bool replaceChild(const ref_ptr< T > &origChild, const ref_ptr< R > &newChild)
Definition Group:100
virtual bool addChild(Node *child)
Add Node to Group.
bool removeChild(unsigned int pos, unsigned int numChildrenToRemove=1)
Remove Node from Group.
Definition Group:84
virtual Group * asGroup()
convert 'this' into a Group pointer if Node is a Group, otherwise return 0.
Definition Group:40
unsigned int getChildIndex(const Node *node) const
Get the index number of child, return a value between 0 and _children.size()-1 if found,...
Definition Group:141
bool containsNode(const ref_ptr< T > &node) const
Definition Group:135
NodeList _children
Definition Group:170
virtual bool removeChild(Node *child)
Remove Node from Group.
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
bool containsNode(const Node *node) const
Return true if node is contained within Group.
Definition Group:123
bool addChild(const ref_ptr< T > &child)
Definition Group:53
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
#define OSG_EXPORT
Definition Export:39