Class dnx.lr.node.SwitchNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.node.SwitchNode

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.lr.Node
                   |
                   +----dnx.lr.GroupingNode
                           |
                           +----dnx.lr.SwitchingNode
                                   |
                                   +----dnx.lr.node.SwitchNode

public class SwitchNode
extends SwitchingNode
 Switch {
    exposedField MFNode       choice          []
    exposedField SFInt32      whichChoice     -1
 }

The Switch grouping node traverses zero or one of the nodes specified in the choice field.

See the "Concepts - Grouping and Children Nodes" section which describes "children nodes" for a details on the types of nodes that are legal values for choice.

The whichChoice field specifies the index of the child to traverse, where the first child has index 0. If whichChoice is less than zero or greater than the number of nodes in the choice field then nothing is chosen.

Note that all nodes under a Switch continue to receive and send events (i.e.routes) 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.


Variable Index

 o choice
 o whichChoice

Constructor Index

 o SwitchNode()

Method Index

 o boundingBoxHasChanged(Field)
Meant to be overridden by subclasses.
 o createNodeDefinition(NodeDefinition)
Create the node definition.
 o getChildren()
 o getSwitchedInNode()
 o initFields()
Initialize field values.
 o mapTraversalPathInstanceChildren(NodeInstance, ChildInstanceMapper, Camera, Matrix4, Object)
 o mapTraversalPathNodeChildren(ChildNodeMapper, Camera, Matrix4, Object)
 o recomputeBoundingBox(BoundingBox3)
Meant to be overridden by subclasses; compute the bounding box and store into the argument.
 o updateSubtreePropertyNodes(MFNode)
Update the list of subtree property nodes in the children of this node.

Variables

 o choice
  public MFNode choice
 o whichChoice
  public SFInt32 whichChoice

Constructors

 o SwitchNode
  public SwitchNode()

Methods

 o createNodeDefinition
  protected void createNodeDefinition(NodeDefinition def)
Create the node definition.
Overrides:
createNodeDefinition in class Node
 o initFields
  protected void initFields()
Initialize field values.
Overrides:
initFields in class Node
 o getChildren
  public MFNode getChildren()
Overrides:
getChildren in class GroupingNode
 o getSwitchedInNode
  public Node getSwitchedInNode()
 o mapTraversalPathNodeChildren
  public boolean mapTraversalPathNodeChildren(ChildNodeMapper fun,
                                              Camera cam,
                                              Matrix4 objectToViewerMatrix,
                                              Object mapData)
Overrides:
mapTraversalPathNodeChildren in class Node
 o mapTraversalPathInstanceChildren
  public NodeInstance mapTraversalPathInstanceChildren(NodeInstance inst,
                                                       ChildInstanceMapper fun,
                                                       Camera cam,
                                                       Matrix4 objectToViewerMatrix,
                                                       Object mapData)
Overrides:
mapTraversalPathInstanceChildren in class Node
 o updateSubtreePropertyNodes
  protected void updateSubtreePropertyNodes(MFNode children)
Update the list of subtree property nodes in the children of this node.
Overrides:
updateSubtreePropertyNodes in class GroupingNode
 o recomputeBoundingBox
  public void recomputeBoundingBox(BoundingBox3 box)
Meant to be overridden by subclasses; compute the bounding box and store into the argument.
Overrides:
recomputeBoundingBox in class Node
 o boundingBoxHasChanged
  protected boolean boundingBoxHasChanged(Field f)
Meant to be overridden by subclasses.
Overrides:
boundingBoxHasChanged in class Node

All Packages  Class Hierarchy  This Package  Previous  Next  Index