Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <switch.h>
Inherits Node.
Inheritance diagram for Switch:
Public Member Functions | |
Switch (const char *name="") | |
virtual | ~Switch () |
virtual unsigned int | nbFields () const |
virtual FieldHandle | field (const std::string &n) |
virtual FieldHandle | field (const unsigned int i) |
virtual bool | isSetToDefaultValue (const unsigned int i) const |
virtual unsigned int | nbEventsIn () const |
virtual EventInHandle | eventIn (const std::string &n) |
virtual EventInHandle | eventIn (const unsigned int i) |
virtual unsigned int | nbEventsOut () const |
virtual EventOutHandle | eventOut (const std::string &n) |
virtual EventOutHandle | eventOut (const unsigned int i) |
const char * | typeName () const |
virtual Node * | duplicate () const |
virtual Node * | duplicate (std::map< const Node *, Node * > &) const |
Public Attributes | |
Exposed Fields | |
A field that is capable of receiving events via an eventIn to change its value(s), and generating events via an eventOut when its value(s) change. | |
MFNode | choice |
SFInt32 | whichChoice |
Events In | |
EventIn< MFNode > | set_choice |
EventIn< SFInt32 > | set_whichChoice |
Events Out | |
EventOut< MFNode > | choice_changed |
EventOut< SFInt32 > | whichChoice_changed |
The Switch grouping node traverses zero or one of the nodes specified in the choice field.
4.6.5, Grouping and children nodes, describes details on the types of nodes that are legal values for choice.
The whichChoice field specifies the index of the child to traverse, with the first child having index 0. If whichChoice is less than zero or greater than the number of nodes in the choice field, nothing is chosen.
All nodes under a Switch continue to receive and send events regardless of the value of whichChoice. For example, if an active TimeSensor is contained within an inactive choice of an Switch, the TimeSensor sends events regardless of the Switch's state.
|
Construct a node with all its fields set to default value, which is equivalent to the code below: whichChoice = -1; |
|
Virtual destructor, does nothing |
|
Implements Node. |
|
Returns a deep copy of this node, that is a fully independant node with all children (if any) also copied. This is mainly useful for instanciating protos. Implements Node. |
|
Return a handle on the Implements Node. |
|
Return a handle on the event in named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the event out named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the field named
Implements Node. |
|
Implements Node. |
|
Returns the number of events in for this node type. Implements Node. |
|
Returns the number of events out for this node type. Implements Node. |
|
Returns the number of fields (exposed or not) for this node type. Implements Node. |
|
Returns Implements Node. |
|
See Detailed Description for meaning of this field. Default value is set to MFNode default value |
|
Changed event associated to exposedField choice |
|
Set event associated to exposedField choice |
|
Set event associated to exposedField whichChoice |
|
See Detailed Description for meaning of this field. Default value is set to whichChoice = -1; |
|
Changed event associated to exposedField whichChoice |
Generated on 24 Feb 2005 with version 1.3.9.1. |