Google

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 removeChild(unsigned int pos, unsigned int numChildrenToRemove=1)
[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]virtual bool setChild( unsigned int i, Node* node )
set child node at position i.
[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 unsigned int getChildIndex( const Node* node ) const
Get 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


Inherited from Node:

Public Methods

ovirtual Object* cloneType() const
ovirtual Object* clone(const CopyOp& copyop) const
ovirtual bool isSameKindAs(const Object* obj) const
ovirtual const char* libraryName() const
ovirtual const char* className() const
ovirtual Transform* asTransform()
ovirtual const Transform* asTransform() 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 ParentList getParents()
oinline Group* getParent(unsigned int i)
oinline const Group* getParent(unsigned int i) const
oinline unsigned int getNumParents() const
ovoid setUpdateCallback(NodeCallback* nc)
oinline NodeCallback* getUpdateCallback()
oinline const NodeCallback* getUpdateCallback() const
ovoid setAppCallback(NodeCallback* nc)
oinline NodeCallback* getAppCallback()
oinline const NodeCallback* getAppCallback() const
oinline unsigned int getNumChildrenRequiringUpdateTraversal() const
ovoid setCullCallback(NodeCallback* nc)
oinline NodeCallback* getCullCallback()
oinline const NodeCallback* getCullCallback() const
ovoid setCullingActive(bool active)
oinline bool getCullingActive() const
oinline unsigned int getNumChildrenWithCullingDisabled() const
oinline bool isCullingActive() const
oinline unsigned int getNumChildrenWithOccluderNodes() const
obool containsOccluderNodes() const
oinline void setNodeMask(NodeMask nm)
oinline NodeMask getNodeMask() const
oinline const DescriptionList& getDescriptions() const
oinline DescriptionList& getDescriptions()
oinline const std::string& getDescription(unsigned int i) const
oinline std::string& getDescription(unsigned int i)
oinline unsigned int getNumDescriptions() const
ovoid addDescription(const std::string& desc)
oinline void setStateSet(osg::StateSet* dstate)
oosg::StateSet* getOrCreateStateSet()
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 unsigned int NodeMask
otypedef std::vector<std::string> DescriptionList

Protected Fields

omutable BoundingSphere _bsphere
omutable bool _bsphere_computed
ostd::string _name
oParentList _parents
oref_ptr<NodeCallback> _updateCallback
ounsigned int _numChildrenRequiringUpdateTraversal
oref_ptr<NodeCallback> _cullCallback
obool _cullingActive
ounsigned int _numChildrenWithCullingDisabled
ounsigned int _numChildrenWithOccluderNodes
oNodeMask _nodeMask
oDescriptionList _descriptions
oref_ptr<StateSet> _stateset

Protected Methods

ovoid addParent(osg::Group* node)
ovoid removeParent(osg::Group* node)
ovoid setNumChildrenRequiringUpdateTraversal(unsigned int num)
ovoid setNumChildrenWithCullingDisabled(unsigned int num)
ovoid setNumChildrenWithOccluderNodes(unsigned int num)


Inherited from Object:

Public Methods

oinline void setDataVariance(DataVariance dv)
oinline DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Public Members

oenum DataVariance

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
ostatic void setDeleteHandler(DeleteHandler* handler)
ostatic DeleteHandler* getDeleteHandler()
oinline void ref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline void unref() 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

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 removeChild(unsigned int pos, unsigned int numChildrenToRemove=1)

ovirtual bool replaceChild( Node* origChild, Node* newChild )
Replace specified Node with another Node. Equivalent to setChild(getChildIndex(orignChild),node), see docs for setChild for futher details on implementation.

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

ovirtual bool setChild( unsigned int i, Node* node )
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 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 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 unsigned int getChildIndex( const Node* node ) const
Get 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
Sequence
Projection
OccluderNode
LightSource
LOD
ClipNode
ClearNode

Alphabetic index HTML hierarchy of classes or Java



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