| java.lang.Object javax.media.j3d.NodeReferenceTable
NodeReferenceTable | public class NodeReferenceTable extends Object (Code) | | The NodeReferenceTable object is used by a leaf node's
updateNodeReferences method called by the
cloneTree method.
The NodeReferenceTable maps nodes from the original subgraph
to the new nodes in the cloned subgraph. This information
can then be used to update any cloned leaf node references
to reference nodes in the cloned subgraph.
During a cloneTree call, after all nodes have been duplicated,
each SceneGraphObject's updateNodeReferences method is called.
This method takes a NodeReferenceTable object as a parameter. The
SceneGraphObject's updateNodeReferences method can then use the
getNewObjectReference method from this object to get updated
references to objects that have been duplicated in the new cloneTree
sub-graph. If a match is found, a
reference to the corresponding SceneGraphObject in the newly cloned sub-graph
is returned. If no corresponding reference is found, either a
DanglingReferenceException is thrown by the cloneTree
method or a reference to the original
SceneGraphObject is returned depending on the value of the
allowDanglingReferences parameter passed in the
cloneTree call.
See Also: SceneGraphObject.updateNodeReferences See Also: Node.cloneTree See Also: DanglingReferenceException |
allowDanglingReferences | boolean allowDanglingReferences(Code) | | |
NodeReferenceTable | public NodeReferenceTable()(Code) | | Constructs an empty NodeReferenceTable.
since: Java 3D 1.2 |
NodeReferenceTable | NodeReferenceTable(boolean allowDanglingReferences, Hashtable objectHashtable)(Code) | | |
getNewObjectReference | final public SceneGraphObject getNewObjectReference(SceneGraphObject oldReference)(Code) | | This method is used in conjunction with the cloneTree
method. It can be used by the updateNodeReferences
method to see if a SceneGraphObject that is being referenced has been duplicated
in the new cloneTree sub-graph.
A SceneGraphObject's updateNodeReferences method would use this
method by calling it with the reference to the old (existed before
the cloneTree operation) object. If the object has been duplicated
in the cloneTree sub-graph, the corresponding object in the cloned
sub-graph is returned. If no corresponding reference is found, either
a DanglingReferenceException is thrown or a reference to the original
SceneGraphObject is returned depending on the value of the
allowDanglingReferences parameter passed in the
cloneTree call.
Parameters: oldReference - the reference to the object inthe original sub-graph. A reference to the corresponding object in the clonedsub-graph. If no corresponding object exists, either aDanglingReferenceException will be generated by thecloneTree method or a reference to the original objectis returned depending on the value of theallowDanglingReferences parameter passed in thecloneTree call. See Also: SceneGraphObject.updateNodeReferences See Also: Node.cloneTree See Also: DanglingReferenceException |
set | void set(boolean allowDanglingReferences, Hashtable objectHashtable)(Code) | | |
|
|