class SG_EXPORT osg::Group

General group node which maintains a list of children.

Inheritance:


Public Methods

[more] Group()
[more] Group(const Group&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more] META_Node(osg, Group)
[more]virtual Group* asGroup()
[more]virtual const Group* asGroup() const
[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 unsigned int getNumChildren() const
return the number of chilren nodes
[more]inline Node* getChild( unsigned int i )
return child node at position i
[more]inline const Node* getChild( 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.
[more]inline unsigned int findChildNo( const Node* node ) const
Find the index number of child, return a value between 0 and _childrensize()-1 if found, if not found then return _childrensize()

Public Members

[more]typedef std::vector<ref_ptr<Node> > ChildList

Protected Fields

[more]ChildList _children

Protected Methods

[more]virtual ~Group()
[more]virtual 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

o Group()

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

o META_Node(osg, Group)

ovirtual Group* asGroup()

ovirtual const Group* asGroup() const

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 unsigned int getNumChildren() const
return the number of chilren nodes

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

oinline const Node* getChild( 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.

oinline unsigned int findChildNo( const Node* node ) const
Find the index number of child, return a value between 0 and _childrensize()-1 if found, if not found then return _childrensize()

ovirtual ~Group()

ovirtual bool computeBound() const

oChildList _children


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

Alphabetic index HTML hierarchy of classes or Java



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