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] 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 int getNumChildren() const
return the number of chilren nodes
[more]inline Node* getChild( const int i )
return child node at position i
[more]inline const Node* getChild( const 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


Inherited from Node:

Public Methods

ovirtual Object* clone() const
ovirtual bool isSameKindAs(const Object* obj) const
ovirtual const char* className() const
ovirtual void accept(NodeVisitor& nv)
ovirtual void ascend(NodeVisitor& nv)
oinline void setName( const std::string& name )
oinline void setName( const char* name )
oinline const std::string& getName() const
oinline const ParentList& getParents() const
oinline Group* getParent(const int i)
oinline const Group* getParent(const int i) const
oinline const int getNumParents() const
ovoid setAppCallback(NodeCallback* nc)
oinline NodeCallback* getAppCallback()
oinline const NodeCallback* getAppCallback() const
oinline const int getNumChildrenRequiringAppTraversal() const
ovoid setCullingActive(const bool active)
oinline const bool getCullingActive() const
oinline const int getNumChildrenWithCullingDisabled() const
oinline void setUserData(osg::Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const
oinline void setNodeMask(const NodeMask nm)
oinline const NodeMask getNodeMask() const
oinline const DescriptionList& getDescriptions() const
oinline DescriptionList& getDescriptions()
oinline const std::string& getDescription(const int i) const
oinline std::string& getDescription(const int i)
oinline const int getNumDescriptions() const
ovoid addDescription(const std::string& desc)
oinline void setStateSet(osg::StateSet* dstate)
oinline osg::StateSet* getStateSet()
oinline const osg::StateSet* getStateSet() const
oinline const BoundingSphere& getBound() const
ovoid dirtyBound()

Public Members

otypedef std::vector<Group*> ParentList
otypedef std::vector<std::string> DescriptionList

Protected Fields

omutable BoundingSphere _bsphere
omutable bool _bsphere_computed
ostd::string _name
oParentList _parents
oref_ptr<NodeCallback> _appCallback
oint _numChildrenRequiringAppTraversal
obool _cullingActive
oint _numChildrenWithCullingDisabled
oosg::ref_ptr<Referenced> _userData
oNodeMask _nodeMask
oDescriptionList _descriptions
oref_ptr<StateSet> _dstate

Protected Methods

ovoid setNumChildrenRequiringAppTraversal(const int num)
ovoid setNumChildrenWithCullingDisabled(const int num)


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


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

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

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

Alphabetic index HTML hierarchy of classes or Java



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