All Packages Class Hierarchy This Package Previous Next Index
Class java.media.j3d.Switch
java.lang.Object
|
+----java.media.j3d.SceneGraphObject
|
+----java.media.j3d.Node
|
+----java.media.j3d.Group
|
+----java.media.j3d.Switch
- public class Switch
- extends Group
The switch node controls which one of its children will be rendered.
-
ALLOW_SWITCH_READ
- For Switch nodes, specifies that the node allows reading its
switch value.
-
ALLOW_SWITCH_WRITE
- For Switch nodes, specifies that the node allows writing its
switch value.
-
CHILD_ALL
-
-
CHILD_MASK
-
-
CHILD_NONE
- These values are used to determine which children are selected
for rendering.
-
Switch()
- Constructs and initializes a switch node
with a default choice of the first child.
-
Switch(int)
- Constructs and initializes a switch node.
-
Switch(int, BitSet)
- Constructs and initializes a switch node.
-
currentChild()
- Returns this node's current child.
-
getChildMask()
- Returns the current childMask.
-
getWhichChild()
- Returns the index of the current child.
-
setChildMask(BitSet)
- Sets current childMask.
-
setWhichChild(int)
- Sets which child should be drawn.
ALLOW_SWITCH_READ
public static final int ALLOW_SWITCH_READ
- For Switch nodes, specifies that the node allows reading its
switch value.
ALLOW_SWITCH_WRITE
public static final int ALLOW_SWITCH_WRITE
- For Switch nodes, specifies that the node allows writing its
switch value.
CHILD_NONE
public static final int CHILD_NONE
- These values are used to determine which children are selected
for rendering. A value of CHILD_NONE indicates no child is
selected, a value of CHILD_ALL indicates all children are
rendered, making switch node as an ordinary group node and
a value of CHILD_MASK indicates that the childMask BitSet is
used to select children for rendering.
CHILD_ALL
public static final int CHILD_ALL
CHILD_MASK
public static final int CHILD_MASK
Switch
public Switch(int whichChild)
- Constructs and initializes a switch node.
- Parameters:
- whichChild - the default child to choose
Switch
public Switch()
- Constructs and initializes a switch node
with a default choice of the first child.
Switch
public Switch(int whichChild,
BitSet childMask)
- Constructs and initializes a switch node.
- Parameters:
- whichChild - the child to be chosen
- childMask - the childMask BitSet for child selection
setWhichChild
public final void setWhichChild(int child)
- Sets which child should be drawn.
- Parameters:
- child - an integer specifying which child to render
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getWhichChild
public final int getWhichChild()
- Returns the index of the current child.
- Returns:
- the index of the current child to render
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setChildMask
public final void setChildMask(BitSet childMask)
- Sets current childMask.
- Parameters:
- childMask - a BitSet to select the children for rendering
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getChildMask
public final BitSet getChildMask()
- Returns the current childMask.
- Returns:
- the current childMask
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
currentChild
public final Node currentChild()
- Returns this node's current child.
- Returns:
- a reference to the current child chosen for rendering
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
All Packages Class Hierarchy This Package Previous Next Index