All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.media.j3d.SceneGraphObject | +----java.media.j3d.Node | +----java.media.j3d.Leaf
cloneTree
.
public Leaf()
public Node cloneTree(boolean forceDuplicate, boolean allowDanglingReferences)
cloneNode
and
then cloneTree
is called for each child node. For
Leaf Nodes, component
data can either be duplicated or be made a reference to the original
data. Leaf Node cloneTree behavior is determined by the
duplicateOnCloneTree
flag found in every Leaf Node's
component data class and by the forceDuplicate
paramter.
true
, causes the
duplicateOnCloneTree
flag to be ignored. When false
, the value of each node's
duplicateOnCloneTree
determines whether data is
duplicated or copied.
true
allows
the cloneTree
method to complete even whan a dangling reference is discovered. When
this parameter is false
a
DanglingReferenceException
is generated as
soon as cloneTree detects this situation.
allowDanglingReference
parameter is false.
public void updateNodeReferences(NodeReferenceTable referenceTable)
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 getNewNodeReference
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.
getNewNodeReference
method needed to search for
new object instances.
All Packages Class Hierarchy This Package Previous Next Index