| |
|
| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Leaf javax.media.j3d.Behavior javax.media.j3d.LOD
All known Subclasses: javax.media.j3d.DistanceLOD,
LOD | abstract public class LOD extends Behavior (Code) | | 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.
|
Constructor Summary | |
public | LOD() Constructs and initializes an LOD node. |
Method Summary | |
public void | addSwitch(Switch switchNode) Appends the specified switch node to this LOD's list of switches. | void | duplicateAttributes(Node originalNode, boolean forceDuplicate) Copies all LOD information from
originalNode into
the current node. | public Enumeration | getAllSwitches() Returns the enumeration object of all switches. | public Switch | getSwitch(int index) Returns the switch node specified by the index. | public int | indexOfSwitch(Switch switchNode) 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. | public void | insertSwitch(Switch switchNode, int index) Inserts the specified switch node at specified index. | public int | numSwitches() Returns a count of this LOD's switches. | public void | removeAllSwitches() Removes all switch nodes from this LOD node. | public void | removeSwitch(int index) Removes the switch node at specified index. | public void | removeSwitch(Switch switchNode) Removes the specified switch node from this LOD node's
list of switches. | public void | setSwitch(Switch switchNode, int index) Replaces the specified switch node with the switch node provided. | public void | updateNodeReferences(NodeReferenceTable referenceTable) Callback used to allow a node to check if any nodes referenced
by that node have been duplicated via a call to cloneTree .
This method is called by cloneTree after all nodes in
the sub-graph have been duplicated. |
switches | Vector switches(Code) | | The LOD Node's vector of switch nodes.
|
LOD | public LOD()(Code) | | Constructs and initializes an LOD node.
|
addSwitch | public void addSwitch(Switch switchNode)(Code) | | 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 |
duplicateAttributes | void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code) | | Copies all LOD information from
originalNode into
the current node. This method is called from the
cloneNode method which is, in turn, called by the
cloneTree method.
Parameters: originalNode - the original node to duplicate. Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. exception: RestrictedAccessException - if this object is part of a liveor compiled scenegraph. See Also: Node.duplicateNode See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
getAllSwitches | public Enumeration getAllSwitches()(Code) | | Returns the enumeration object of all switches.
the enumeration object of all switches |
getSwitch | public Switch getSwitch(int index)(Code) | | Returns the switch node specified by the index.
Parameters: index - which switch node to return the switch node at location index |
indexOfSwitch | public int indexOfSwitch(Switch switchNode)(Code) | | 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. the index of the specified switch node;returns -1 if the object is not in the list. since: Java 3D 1.3 |
insertSwitch | public void insertSwitch(Switch switchNode, int index)(Code) | | Inserts the specified switch node at specified index.
Parameters: switchNode - the new switch node Parameters: index - position to insert new switch node at |
numSwitches | public int numSwitches()(Code) | | Returns a count of this LOD's switches.
the number of switches controlled by this LOD |
removeAllSwitches | public void removeAllSwitches()(Code) | | Removes all switch nodes from this LOD node.
since: Java 3D 1.3 |
removeSwitch | public void removeSwitch(int index)(Code) | | Removes the switch node at specified index.
Parameters: index - which switch node to remove |
removeSwitch | public void removeSwitch(Switch switchNode)(Code) | | 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 |
setSwitch | public void setSwitch(Switch switchNode, int index)(Code) | | Replaces the specified switch node with the switch node provided.
Parameters: switchNode - the new switch node Parameters: index - which switch node to replace |
updateNodeReferences | public void updateNodeReferences(NodeReferenceTable referenceTable)(Code) | | Callback used to allow a node to check if any nodes referenced
by that node have been duplicated via a call to cloneTree .
This method is called by cloneTree after 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 the getNewObjectReference method found in the
NodeReferenceTable object. 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 the
allowDanglingReferences parameter passed in the
cloneTree call.
NOTE: Applications should not call this method directly.
It should only be called by the cloneTree method.
Parameters: referenceTable - a NodeReferenceTableObject that contains thegetNewObjectReference method needed to search fornew object instances. See Also: NodeReferenceTable See Also: Node.cloneTree See Also: DanglingReferenceException |
|
|
|