instantreality 1.0

Component:
Grouping
Status:
fully implemented
Structure type:
concrete
Standard:
X3D2.0

Switch

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.

Inheritance

Code

XML encoding
<Switch whichChoice='-1'
cycle='TRUE'
bboxCenter='0 0 0'
bboxSize='-1 -1 -1'
render='TRUE'
showBBox='FALSE'
logFeature=''
 />
Classic encoding
Switch {
	whichChoice -1
	cycle TRUE
	bboxCenter 0 0 0
	bboxSize -1 -1 -1
	render TRUE
	showBBox FALSE
	logFeature [""]
}

Interface

Filter: X3D only | Avalon only | All
id Name DataType PartType Default ValueType Description
XFAny next XFAny inputOnly incr whichChoice field if value is non-negative
XFAny prev XFAny inputOnly decr whichChoice field if value is non-negative
SFBool cycle SFBool inputOutput TRUE incr/decr in a modulo manner or clamp value whichChoice
SFBool render SFBool inputOutput TRUE Flag to control the visibility of the node or subtree
SFBool showBBox SFBool inputOutput FALSE Show Bounding Box of Subtree.
MFString logFeature MFString inputOutput state, child, parent, route, eventIn, eventOut controls the logging of changes, state: log state changes (e.g. live), child: log child add/remove, parent: log parent add/remove, route: log route add/remove; eventIn: log receiving of events, eventOut: log sending of events: guiView, runtime system should create node-view, guiEdit: runtime system should create node-editeverything: log everything