Inheritance diagram for osg::Group:
Public Member Functions | |
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 Group * | asGroup () |
convert 'this' into a Group pointer if Node is a Group, otherwise return 0. | |
virtual const Group * | asGroup () const |
convert 'const this' into a const Group pointer if Node is a Group, otherwise return 0. | |
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 | insertChild (unsigned int index, Node *child) |
Insert Node to Group at specific location. | |
virtual bool | removeChild (Node *child) |
Remove Node from Group. | |
virtual bool | removeChild (unsigned int pos, unsigned int numChildrenToRemove=1) |
virtual bool | replaceChild (Node *origChild, Node *newChild) |
Replace specified Node with another Node. | |
unsigned int | getNumChildren () const |
Return the number of chilren nodes. | |
virtual bool | setChild (unsigned int i, Node *node) |
Set child node at position i. | |
Node * | getChild (unsigned int i) |
Return child node at position i. | |
const Node * | getChild (unsigned int i) const |
Return child node at position i. | |
bool | containsNode (const Node *node) const |
Return true if node is contained within Group. | |
unsigned int | getChildIndex (const Node *node) const |
Get the index number of child, return a value between 0 and _children.size()-1 if found, if not found then return _children.size(). | |
virtual void | releaseGLObjects (osg::State *=0) const |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. | |
virtual BoundingSphere | computeBound () const |
Compute the bounding sphere around Node's geometry or children. | |
Protected Member Functions | |
virtual | ~Group () |
virtual void | childRemoved (unsigned int, unsigned int) |
virtual void | childInserted (unsigned int) |
Protected Attributes | |
NodeList | _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. Reimplemented in osg::LOD, osg::PagedLOD, osg::ProxyNode, osg::Switch, and osgSim::MultiSwitch. |
|
convert 'const this' into a const Group pointer if Node is a Group, otherwise return 0. Equivalent to dynamic_cast<const Group*>(this). Reimplemented from osg::Node. |
|
convert 'this' into a Group pointer if Node is a Group, otherwise return 0. Equivalent to dynamic_cast<Group*>(this). Reimplemented from osg::Node. |
|
Reimplemented in osg::LOD, and osg::PagedLOD. |
|
Reimplemented in osg::LOD, and osg::PagedLOD. |
|
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::LightSource, osg::LOD, osg::OccluderNode, osg::ProxyNode, osg::Switch, osg::Transform, and osgSim::Impostor. |
|
Return true if node is contained within Group.
|
|
Return child node at position i.
|
|
Return child node at position i.
|
|
Get the index number of child, return a value between 0 and _children.size()-1 if found, if not found then return _children.size().
|
|
Return the number of chilren nodes.
|
|
Insert Node to Group at specific location. The new child node is inserted into the child list before the node at the specified index. No nodes are removed from the group with this operation. Reimplemented in osg::Switch, and osgSim::MultiSwitch. |
|
|
|
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objexts for all graphics contexts. Reimplemented from osg::Node. |
|
|
|
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. Reimplemented in osg::LOD, osg::PagedLOD, osg::ProxyNode, osg::Switch, and osgSim::MultiSwitch. |
|
Replace specified Node with another Node. Equivalent to setChild(getChildIndex(orignChild),node) See docs for setChild for futher details on implementation. |
|
Set child node at position i. Return true if set correctly, false on failure (if node==NULL || i is out of range). When Set can be successful applied, the algorithm is : decrement the reference count origNode and increment the reference count of newNode, and dirty the bounding sphere to force it to recompute on next getBound() and return 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::LOD, osg::PagedLOD, osg::ProxyNode, osg::Sequence, osg::Switch, osgFX::Effect, osgSim::DOFTransform, osgSim::Impostor, osgSim::MultiSwitch, osgSim::OverlayNode, osgSim::VisibilityGroup, and osgTerrain::HeightFieldNode. |
|
|