Class Switch

java.lang.Object
All Implemented Interfaces:
X3DChildNode, X3DNode, Switch, X3DBoundedObject, X3DGroupingNode

public class Switch extends X3DConcreteNode implements Switch
Switch is a Grouping node that only renders one (or zero) child at a time.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. Switch node tooltip: [X3DGroupingNode,X3DVisibleObject] Switch is a Grouping node that only renders one (or zero) child at a time. Switch can contain most nodes. (Contained nodes are now called 'children' rather than 'choice', for consistent naming among all GroupingNodeType nodes.) All child choices continue to receive and send events regardless of whichChoice is active.
  • Hint: insert a Shape node before adding geometry or Appearance.
  • Hint: authors can temporarily hide test geometry under an unselected child of a Switch. This is a good alternative to "commenting out" nodes.
  • Hint: GeoViewpoint OrthoViewpoint and Viewpoint share the same binding stack, so no more than one of these nodes can be bound and active at a given time.
  • Warning: do not include GeoViewpoint OrthoViewpoint or Viewpoint as a child of LOD or Switch, instead use ViewpointGroup as parent to constrain location proximity where the viewpoint is available to user.
  • Warning: results are undefined if a bindable node (Background, Fog, NavigationInfo, OrthoViewpoint, TextureBackground, Viewpoint) is a contained descendant node of either LOD or Switch. Avoid this authoring pattern.
  • Hint: contained nodes must have type X3DChildNode, such as Group or Transform or Shape.
  • Warning: Switch is not allowed as parent of Appearance, Material, Color, Coordinate, Normal or Texture nodes.

Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also: