Package javax.media.j3d
Class LOD
- Direct Known Subclasses:
DistanceLOD
An LOD leaf node is an abstract behavior class that operates on
a list of Switch group nodes to select one of the children of the
Switch nodes.
The LOD class is extended to implement various selection criteria.
-
Field Summary
Fields inherited from class javax.media.j3d.Node
ALLOW_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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends the specified switch node to this LOD's list of switches.Returns the enumeration object of all switches.getSwitch(int index) Returns the switch node specified by the index.intindexOfSwitch(Switch switchNode) Retrieves the index of the specified switch node in this LOD node's list of switches.voidinsertSwitch(Switch switchNode, int index) Inserts the specified switch node at specified index.intReturns a count of this LOD's switches.voidRemoves all switch nodes from this LOD node.voidremoveSwitch(int index) Removes the switch node at specified index.voidremoveSwitch(Switch switchNode) Removes the specified switch node from this LOD node's list of switches.voidReplaces the specified switch node with the switch node provided.voidupdateNodeReferences(NodeReferenceTable referenceTable) Callback used to allow a node to check if any nodes referenced by that node have been duplicated via a call tocloneTree.Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, initialize, postId, processStimulus, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, wakeupOnMethods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableMethods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
-
Constructor Details
-
LOD
public LOD()Constructs and initializes an LOD node.
-
-
Method Details
-
addSwitch
Appends the specified switch node to this LOD's list of switches.- Parameters:
switchNode- the switch node to add to this LOD's list of switches
-
setSwitch
Replaces the specified switch node with the switch node provided.- Parameters:
switchNode- the new switch nodeindex- which switch node to replace
-
insertSwitch
Inserts the specified switch node at specified index.- Parameters:
switchNode- the new switch nodeindex- position to insert new switch node at
-
removeSwitch
public void removeSwitch(int index) Removes the switch node at specified index.- Parameters:
index- which switch node to remove
-
getSwitch
Returns the switch node specified by the index.- Parameters:
index- which switch node to return- Returns:
- the switch node at location index
-
getAllSwitches
Returns the enumeration object of all switches.- Returns:
- the enumeration object of all switches
-
numSwitches
public int numSwitches()Returns a count of this LOD's switches.- Returns:
- the number of switches controlled by this LOD
-
indexOfSwitch
Retrieves the index of the specified switch node in this LOD node's list of switches.- Parameters:
switchNode- the switch node to be looked up.- Returns:
- the index of the specified switch node; returns -1 if the object is not in the list.
- Since:
- Java 3D 1.3
-
removeSwitch
Removes the specified switch node from this LOD node's list of switches. If the specified object is not in the list, the list is not modified.- Parameters:
switchNode- the switch node to be removed.- Since:
- Java 3D 1.3
-
removeAllSwitches
public void removeAllSwitches()Removes all switch nodes from this LOD node.- Since:
- Java 3D 1.3
-
updateNodeReferences
Callback used to allow a node to check if any nodes referenced by that node have been duplicated via a call tocloneTree. This method is called bycloneTreeafter all nodes in the sub-graph have been duplicated. The cloned Leaf node's method will be called and the Leaf node can then look up any node references by using thegetNewObjectReferencemethod found in theNodeReferenceTableobject. If a match is found, a reference to the corresponding Node in the newly cloned sub-graph is returned. If no corresponding reference is found, either a DanglingReferenceException is thrown or a reference to the original node is returned depending on the value of theallowDanglingReferencesparameter passed in thecloneTreecall.NOTE: Applications should not call this method directly. It should only be called by the cloneTree method.
- Overrides:
updateNodeReferencesin classBehavior- Parameters:
referenceTable- a NodeReferenceTableObject that contains thegetNewObjectReferencemethod needed to search for new object instances.- See Also:
-