Inheritance diagram for osg::Group:
Public Types | |
typedef std::vector< ref_ptr< Node > > | ChildList |
Public Methods | |
Group () | |
Group (const Group &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Node (osg, Group) | |
virtual void | traverse (NodeVisitor &nv) |
Traverse downwards : calls children's accept method with NodeVisitor. | |
virtual bool | addChild (Node *child) |
Add Node to Group. | |
virtual bool | removeChild (Node *child) |
Remove Node from Group. | |
virtual bool | replaceChild (Node *origChild, Node *newChild) |
Replace specified Node with another Node. | |
const unsigned int | getNumChildren () const |
return the number of chilren nodes. | |
Node * | getChild (const unsigned int i) |
return child node at position i. | |
const Node * | getChild (const unsigned int i) const |
return child node at position i. | |
bool | containsNode (const Node *node) const |
return true if node is contained within Group. | |
ChildList::iterator | findNode (const Node *node) |
return the iterator position for specified Node. | |
ChildList::const_iterator | findNode (const Node *node) const |
return the const_iterator position for specified Node. | |
Protected Methods | |
virtual | ~Group () |
virtual const bool | computeBound () const |
Compute the bounding sphere around Node's geometry or children. | |
Protected Attributes | |
ChildList | _children |
Children are reference counted. This allows children to be shared with memory management handled automatically via osg::Referenced.
|
|
|
|
|
Copy constructor using CopyOp to manage deep vs shallow copy.
|
|
|
|
If node is not NULL and is not contained in Group then increment its reference count, add it to the child list and dirty the bounding sphere to force it to recompute on next getBound() and return true for success. Otherwise return false. Scene nodes can't be added as child nodes. |
|
Compute the bounding sphere around Node's geometry or children. This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound(). Reimplemented from osg::Node. Reimplemented in osg::ClipNode, osg::Impostor, osg::LightSource, osg::OccluderNode, and osg::Transform. |
|
return true if node is contained within Group.
|
|
return the const_iterator position for specified Node. return _children.end() if node is not contained in Group. |
|
return the iterator position for specified Node. return _children.end() if node is not contained in Group. |
|
return child node at position i.
|
|
return child node at position i.
|
|
return the number of chilren nodes.
|
|
|
|
If Node is contained in Group then remove it from the child list, decrement its reference count, and dirty the bounding sphere to force it to recompute on next getBound() and return true for success. If Node is not found then return false and do not change the reference count of the Node. |
|
Replace specified Node with another Node. Decrement the reference count origNode and increments the reference count of newNode, and dirty the bounding sphere to force it to recompute on next getBound() and returns true. If origNode is not found then return false and do not add newNode. If newNode is NULL then return false and do not remove origNode. Also returns false if newChild is a Scene node. |
|
Traverse downwards : calls children's accept method with NodeVisitor.
Reimplemented from osg::Node. Reimplemented in osg::DOFTransform, osg::LOD, osg::Sequence, and osg::Switch. |
|
|