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(osg, Switch)
-
virtual void traverse(NodeVisitor& nv)
-
void setNewChildDefaultValue(bool value)
-
bool getNewChildDefaultValue() const
-
virtual bool addChild( Node* child )
-
virtual bool addChild( Node* child, bool value )
-
virtual bool removeChild( Node* child )
-
void setValue(unsigned int pos, bool value)
-
void setValue(const Node* child, bool value)
-
bool getValue(unsigned int pos) const
-
bool getValue(const Node* child) const
-
void setValue(int value)
- Selects the active child Node or enables a special SwitchType mode.
-
int getValue() const
-
const ValueList& getValueList() const
Public Members
-
enum Values
- Special values for the Switch.
-
typedef std::vector<bool> ValueList
Protected Fields
-
bool _newChildDefaultValue
-
ValueList _values
Protected Methods
-
virtual ~Switch()
Inherited from Group:
Public Methods
-
virtual Group* asGroup()
-
virtual const Group* asGroup() const
-
virtual bool replaceChild( Node* origChild, Node* newChild )
-
inline unsigned int getNumChildren() const
-
inline Node* getChild( unsigned int i )
-
inline const Node* getChild( unsigned 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
-
inline unsigned int findChildNo( const Node* node ) const
Public Members
-
typedef std::vector<ref_ptr<Node> > ChildList
Protected Fields
-
ChildList _children
Protected Methods
-
virtual 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.
- Switch()
- Switch(const Switch&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
- META_Node(osg, Switch)
- virtual void traverse(NodeVisitor& nv)
- void setNewChildDefaultValue(bool value)
- bool getNewChildDefaultValue() const
- virtual bool addChild( Node* child )
- virtual bool addChild( Node* child, bool value )
- virtual bool removeChild( Node* child )
- void setValue(unsigned int pos, bool value)
- void setValue(const Node* child, bool value)
- bool getValue(unsigned int pos) const
- bool getValue(const Node* child) const
- enum Values
-
Special values for the Switch. Use these if you want to
turn on/off all child nodes.
- ALL_CHILDREN_ON
- All children turned on.
- ALL_CHILDREN_OFF
- All children off.
- MULTIPLE_CHILDREN_ON
- Multiple children turned on
- void setValue(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.
- int getValue() const
- typedef std::vector<bool> ValueList
- const ValueList& getValueList() const
- virtual ~Switch()
- bool _newChildDefaultValue
- ValueList _values
- Direct child classes:
- Sequence
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.