General group node which maintains a list of children.
Inheritance:
Public Methods
-
typedef std::vector<ref_ptr<Node> > ChildList Group()
-
Group(const Group&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
META_Node(Group)
-
virtual void traverse(NodeVisitor& nv)
-
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.
-
inline const unsigned int getNumChildren() const
- return the number of chilren nodes
-
inline Node* getChild( const unsigned int i )
- return child node at position i
-
inline const Node* getChild( const unsigned int i ) const
- return child node at position i
-
inline bool containsNode( const Node* node ) const
- return true if node is contained within Group
-
inline ChildList::iterator findNode( const Node* node )
- return the iterator position for specified Node.
-
inline ChildList::const_iterator findNode( const Node* node ) const
- return the const_iterator position for specified Node.
Protected Fields
-
ChildList _children
Protected Methods
-
virtual ~Group()
-
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.
- typedef std::vector<ref_ptr<Node> > ChildList Group()
- Group(const Group&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
- META_Node(Group)
- virtual void traverse(NodeVisitor& nv)
- virtual 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.
- virtual 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.
- virtual 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.
- inline const unsigned int getNumChildren() const
- return the number of chilren nodes
- inline Node* getChild( const unsigned int i )
- return child node at position i
- inline const Node* getChild( const unsigned int i ) const
- return child node at position i
- inline bool containsNode( const Node* node ) const
- return true if node is contained within Group
- inline ChildList::iterator findNode( const Node* node )
- return the iterator position for specified Node.
return _children.end() if node is not contained in Group.
- inline 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.
- virtual ~Group()
- virtual const bool computeBound() const
- ChildList _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++.