General group node which maintains a list of children.
Inheritance:
Public Methods
-
typedef std::vector<ref_ptr<Node> > ChildList Group()
-
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 int getNumChildren() const
- return the number of chilren nodes
-
inline Node* getChild( const int i )
- return child node at position i
-
inline const Node* getChild( const 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 postion for specified Node.
-
inline ChildList::const_iterator findNode( const Node* node ) const
- return the const_iterator postion for specified Node.
Protected Fields
-
ChildList _children
Protected Methods
-
virtual ~Group()
-
virtual const bool computeBound() const
Inherited from Node:
Public Methods
-
virtual Object* clone() const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* className() const
-
virtual void accept(NodeVisitor& nv)
-
virtual void ascend(NodeVisitor& nv)
-
inline void setName( const std::string& name )
-
inline void setName( const char* name )
-
inline const std::string& getName() const
-
inline const ParentList& getParents() const
-
inline Group* getParent(const int i)
-
inline const Group* getParent(const int i) const
-
inline const int getNumParents() const
-
void setAppCallback(NodeCallback* nc)
-
inline NodeCallback* getAppCallback()
-
inline const NodeCallback* getAppCallback() const
-
inline const int getNumChildrenRequiringAppTraversal() const
-
inline void setUserData(void* data, MemoryAdapter* ma=0L)
-
inline void* getUserData()
-
inline const void* getUserData() const
-
inline MemoryAdapter* getMemoryAdapter()
-
inline const MemoryAdapter* getMemoryAdapter() const
-
inline void setNodeMask(const NodeMask nm)
-
inline const NodeMask getNodeMask() const
-
inline const DescriptionList& getDescriptions() const
-
inline DescriptionList& getDescriptions()
-
inline const std::string& getDescription(const int i) const
-
inline std::string& getDescription(const int i)
-
inline const int getNumDescriptions() const
-
void addDescription(const std::string& desc)
-
inline void setStateSet(osg::StateSet* dstate)
-
inline osg::StateSet* getStateSet()
-
inline const osg::StateSet* getStateSet() const
-
inline const BoundingSphere& getBound() const
-
void dirtyBound()
Public Members
-
typedef std::vector<Group*> ParentList
-
typedef std::vector<std::string> DescriptionList
Protected Fields
-
mutable BoundingSphere _bsphere
-
mutable bool _bsphere_computed
-
std::string _name
-
ParentList _parents
-
ref_ptr<NodeCallback> _appCallback
-
int _numChildrenRequiringAppTraversal
-
void* _userData
-
ref_ptr<MemoryAdapter> _memoryAdapter
-
NodeMask _nodeMask
-
DescriptionList _descriptions
-
ref_ptr<StateSet> _dstate
Protected Methods
-
void setNumChildrenRequiringAppTraversal(const int num)
Inherited from Object:
Public Methods
-
inline Referenced& operator = (Referenced&)
-
inline void ref() const
-
inline void unref() const
-
inline const int referenceCount() const
Protected Fields
-
mutable 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.
- typedef std::vector<ref_ptr<Node> > ChildList Group()
- 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 int getNumChildren() const
- return the number of chilren nodes
- inline Node* getChild( const int i )
- return child node at position i
- inline const Node* getChild( const 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 postion for specified Node.
return _chilren.end() if node is not contained in Group.
- inline ChildList::const_iterator findNode( const Node* node ) const
- return the const_iterator postion for specified Node.
return _chilren.end() if node is not contained in Group.
- virtual ~Group()
- virtual const bool computeBound() const
- ChildList _children
- Direct child classes:
- Transform
Switch
LOD
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.