Switch is a Group node which allows switching between children.
Inheritance:
Public Methods
-
Switch()
-
Switch(const Switch&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
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
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()
- Switch(const Switch&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
- 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++.