class SG_EXPORT osg::Group

General group node which maintains a list of children.

Inheritance:


Public Methods

[more]typedef std::vector<ref_ptr<Node> > ChildList Group()
[more] Group(const Group&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more] META_Node(Group)
[more]virtual void traverse(NodeVisitor& nv)
[more]virtual bool addChild( Node* child )
Add Node to Group.
[more]virtual bool removeChild( Node* child )
Remove Node from Group.
[more]virtual bool replaceChild( Node* origChild, Node* newChild )
Replace specified Node with another Node.
[more]inline const unsigned int getNumChildren() const
return the number of chilren nodes
[more]inline Node* getChild( const unsigned int i )
return child node at position i
[more]inline const Node* getChild( const unsigned int i ) const
return child node at position i
[more]inline bool containsNode( const Node* node ) const
return true if node is contained within Group
[more]inline ChildList::iterator findNode( const Node* node )
return the iterator position for specified Node.
[more]inline ChildList::const_iterator findNode( const Node* node ) const
return the const_iterator position for specified Node.

Protected Fields

[more]ChildList _children

Protected Methods

[more]virtual ~Group()
[more]virtual const bool computeBound() const


Documentation

General group node which maintains a list of children. Children are reference counted. This allows children to be shared with memory management handled automatically via osg::Referenced.
otypedef std::vector<ref_ptr<Node> > ChildList Group()

o Group(const Group&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

o META_Node(Group)

ovirtual void traverse(NodeVisitor& nv)

ovirtual bool addChild( Node* child )
Add Node to Group. 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.

ovirtual bool removeChild( Node* child )
Remove Node from Group. 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.

ovirtual bool replaceChild( Node* origChild, Node* newChild )
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.

oinline const unsigned int getNumChildren() const
return the number of chilren nodes

oinline Node* getChild( const unsigned int i )
return child node at position i

oinline const Node* getChild( const unsigned int i ) const
return child node at position i

oinline bool containsNode( const Node* node ) const
return true if node is contained within Group

oinline ChildList::iterator findNode( const Node* node )
return the iterator position for specified Node. return _children.end() if node is not contained in Group.

oinline ChildList::const_iterator findNode( const Node* node ) const
return the const_iterator position for specified Node. return _children.end() if node is not contained in Group.

ovirtual ~Group()

ovirtual const bool computeBound() const

oChildList _children


Direct child classes:
Transform
Switch
Projection
OccluderNode
LightSource
LOD
EarthSky
ClipNode

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.