|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Group
org.j3d.aviatrix3d.SwitchGroup
public class SwitchGroup
Special grouping node that allows the selection of only a single child to be rendered.
If the node that is the selected index is removed, then the selectedChild is automatically to be invalid. The user must reset the selected child index in order for rendering to continue.
Internationalisation Resource Names
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.Group |
---|
childList, cullList, dirtyBoundsCount, lastChild, pickableList, pickFlags, wkVec1, wkVec2 |
Fields inherited from class org.j3d.aviatrix3d.Node |
---|
bounds, implicitBounds, INVALID_BOUNDS, parent |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject |
---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
Constructor Summary | |
---|---|
SwitchGroup()
The default constructor |
Method Summary | |
---|---|
int |
getActiveChild()
Get the currently selected active child of this switch node. |
Cullable[] |
getCullableChildren()
Get the list of children that are valid to be rendered according to the rules of the grouping node. |
PickTarget |
getPickableChild(int idx)
Return the pickable target instance at the given index. |
PickTarget[] |
getPickableChildren()
Return an array containing all of this group's pickable children. |
int |
numCullableChildren()
Returns the number of valid renderable children to process. |
int |
numPickableChildren()
Returns the number of valid pickable child targets to process. |
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
removeAllChildren()
Removes all children from the group. |
void |
removeChild(int idx)
Remove the child at the specified index from the group. |
void |
setActiveChild(int idx)
Set the selected child to be rendered to the given index. |
void |
setChild(Node newChild,
int idx)
Replaces the child node at the specified index in this group node's list of children with the specified child. |
Methods inherited from class org.j3d.aviatrix3d.Group |
---|
addChild, checkForCyclicChild, checkPickMask, getAllChildren, getChild, getCullableParent, getPickableBounds, getPickMask, getPickTargetType, hasMultipleParents, indexOfChild, markBoundsDirty, numChildren, pickBatch, pickSingle, removeChild, requestBoundsUpdate, setBounds, setLive, setPickMask, setUpdateHandler, updateBounds |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setParent, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.aviatrix3d.rendering.GroupCullable |
---|
getBounds |
Constructor Detail |
---|
public SwitchGroup()
Method Detail |
---|
public void setChild(Node newChild, int idx) throws InvalidWriteTimingException
setChild
in class Group
newChild
- The child node to useidx
- The index to replace. Must be greater than 0 and less then numChildren
java.lang.IndexOutOfBoundsException
- When the idx is invalid
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds callback methodpublic void removeChild(int idx) throws InvalidWriteTimingException
removeChild
in class Group
idx
- The index of the child to remove
IndexOfBoundsException
- When the idx is invalid
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void removeAllChildren() throws InvalidWriteTimingException
removeAllChildren
in class Group
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Cullable[] getCullableChildren()
getCullableChildren
in interface GroupCullable
getCullableChildren
in class Group
public int numCullableChildren()
numCullableChildren
in interface GroupCullable
numCullableChildren
in class Group
protected void recomputeBounds()
recomputeBounds
in class Group
public int numPickableChildren()
numPickableChildren
in interface GroupPickTarget
numPickableChildren
in class Group
public PickTarget[] getPickableChildren()
numPickableChildren()
call for how many valid objects are part
of this array. If there are none, this may return either a null or a
valid array, depending on the implementation.
The list may contain null values.
getPickableChildren
in interface GroupPickTarget
getPickableChildren
in class Group
public PickTarget getPickableChild(int idx)
getPickableChild
in interface GroupPickTarget
getPickableChild
in class Group
idx
- The index of the child to get
public void setActiveChild(int idx) throws InvalidWriteTimingException
idx
- The index of the child to now be rendered
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds changed callback methodpublic int getActiveChild()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |