public class Switch extends Group
| Modifier and Type | Field and Description | 
|---|---|
static int | 
ALLOW_SWITCH_READ
Specifies that this node allows reading its child selection
 and mask values and its current child. 
 | 
static int | 
ALLOW_SWITCH_WRITE
Specifies that this node allows writing its child selection
 and mask values. 
 | 
static int | 
CHILD_ALL
Specifies that all children are rendered. 
 | 
static int | 
CHILD_MASK
Specifies that the childMask BitSet is
 used to select which children are rendered. 
 | 
static int | 
CHILD_NONE
Specifies that no children are rendered. 
 | 
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITEALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING| Constructor and Description | 
|---|
Switch()
Constructs a Switch node with default parameters. 
 | 
Switch(int whichChild)
Constructs and initializes a Switch node using the specified
 child selection index. 
 | 
Switch(int whichChild,
      BitSet childMask)
Constructs and initializes a Switch node using the specified
 child selection index and mask. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Node | 
cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. 
 | 
Node | 
currentChild()
Retrieves the currently selected child. 
 | 
BitSet | 
getChildMask()
Retrieves the current child selection mask. 
 | 
int | 
getWhichChild()
Retrieves the current child selection index that specifies which
 child is rendered. 
 | 
void | 
setChildMask(BitSet childMask)
Sets the child selection mask. 
 | 
void | 
setWhichChild(int child)
Sets the child selection index that specifies which child is rendered. 
 | 
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBoundscloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableclearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferencespublic static final int ALLOW_SWITCH_READ
public static final int ALLOW_SWITCH_WRITE
public static final int CHILD_NONE
public static final int CHILD_ALL
public static final int CHILD_MASK
public Switch()
public Switch(int whichChild)
whichChild - the initial child selection indexpublic Switch(int whichChild,
              BitSet childMask)
whichChild - the initial child selection indexchildMask - the initial child selection maskpublic void setWhichChild(int child)
child - a non-negative integer index value, indicating a
 specific child, or one of the following constants: CHILD_NONE,
 CHILD_ALL, or CHILD_MASK.CapabilityNotSetException - if appropriate capability is
 not set and this object is part of live or compiled scene graphCHILD_NONE, 
CHILD_ALL, 
CHILD_MASKpublic int getWhichChild()
CapabilityNotSetException - if appropriate capability is
 not set and this object is part of live or compiled scene graphCHILD_NONE, 
CHILD_ALL, 
CHILD_MASKpublic void setChildMask(BitSet childMask)
childMask - a BitSet that specifies which children are renderedCapabilityNotSetException - if appropriate capability is
 not set and this object is part of live or compiled scene graphpublic BitSet getChildMask()
CapabilityNotSetException - if appropriate capability is
 not set and this object is part of live or compiled scene graphpublic Node currentChild()
CapabilityNotSetException - if appropriate capability is
 not set and this object is part of live or compiled scene graphpublic Node cloneNode(boolean forceDuplicate)
cloneTree to duplicate the current node.cloneNode in class GroupforceDuplicate - when set to true, causes the
  duplicateOnCloneTree flag to be ignored.  When
  false, the value of each node's
  duplicateOnCloneTree variable determines whether
  NodeComponent data is duplicated or copied.Node.cloneTree(), 
Node.cloneNode(boolean), 
Node.duplicateNode(org.scijava.java3d.Node, boolean), 
NodeComponent.setDuplicateOnCloneTree(boolean)Copyright © 2016–2022 SciJava. All rights reserved.