Switch is a Group node which allows switching between children.
Inheritance:
Public Methods
-
Switch()
-
META_Node(Switch)
-
virtual void traverse(NodeVisitor& nv)
-
inline void setValue(const int value)
- Selects the active child Node or enables a special SwitchType mode.
-
inline const int getValue() const
- Returns the number of the active child Node or the SwitchType
Public Members
-
enum SwitchType
- Special mode values for the Switch.
Protected Fields
-
int _value
- The current Switch value.
Protected Methods
-
virtual ~Switch()
Inherited from Group:
Public Methods
-
virtual bool addChild( Node* child )
-
virtual bool removeChild( Node* child )
-
virtual bool replaceChild( Node* origChild, Node* newChild )
-
inline const int getNumChildren() const
-
inline Node* getChild( const int i )
-
inline const Node* getChild( const int i ) const
-
inline bool containsNode( const Node* node ) const
-
inline ChildList::iterator findNode( const Node* node )
-
inline ChildList::const_iterator findNode( const Node* node ) const
Protected Fields
-
ChildList _children
Protected Methods
-
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
Switch is a Group node which allows switching between children.
Typical uses would be for objects which might need to be rendered
differently at different times, for instance a switch could be used
to represent the different states of a traffic light.
- enum SwitchType
-
Special mode values for the Switch. Use these if you want to
turn on/off all child nodes.
- ALL_CHILDREN_ON
- Turn on all children.
- ALL_CHILDREN_OFF
- Turn off all children.
- Switch()
- META_Node(Switch)
- virtual void traverse(NodeVisitor& nv)
- inline void setValue(const int value)
-
Selects the active child Node or enables a special
SwitchType mode.
- Parameters:
- value - the number of the active child
(first child == number 0) or SwitchType. Invalid values
will be ignored.
- inline const int getValue() const
-
Returns the number of the active child Node or the SwitchType
- virtual ~Switch()
- int _value
- The current Switch value.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.