public abstract class LOD extends Behavior
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 and Description |
---|
LOD()
Constructs and initializes an LOD node.
|
Modifier and Type | Method and Description |
---|---|
void |
addSwitch(Switch switchNode)
Appends the specified switch node to this LOD's list of switches.
|
Enumeration |
getAllSwitches()
Returns the enumeration object of all switches.
|
Switch |
getSwitch(int index)
Returns the switch node specified by the index.
|
int |
indexOfSwitch(Switch switchNode)
Retrieves the index of the specified switch node in
this LOD node's list of switches.
|
void |
insertSwitch(Switch switchNode,
int index)
Inserts the specified switch node at specified index.
|
int |
numSwitches()
Returns a count of this LOD's switches.
|
void |
removeAllSwitches()
Removes all switch nodes from this LOD node.
|
void |
removeSwitch(int index)
Removes the switch node at specified index.
|
void |
removeSwitch(Switch switchNode)
Removes the specified switch node from this LOD node's
list of switches.
|
void |
setSwitch(Switch switchNode,
int index)
Replaces the specified switch node with the switch node provided.
|
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 . |
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, initialize, postId, processStimulus, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, wakeupOn
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
public void addSwitch(Switch switchNode)
switchNode
- the switch node to add to this LOD's list of switchespublic void setSwitch(Switch switchNode, int index)
switchNode
- the new switch nodeindex
- which switch node to replacepublic void insertSwitch(Switch switchNode, int index)
switchNode
- the new switch nodeindex
- position to insert new switch node atpublic void removeSwitch(int index)
index
- which switch node to removepublic Switch getSwitch(int index)
index
- which switch node to returnpublic Enumeration getAllSwitches()
public int numSwitches()
public int indexOfSwitch(Switch switchNode)
switchNode
- the switch node to be looked up.public void removeSwitch(Switch switchNode)
switchNode
- the switch node to be removed.public void removeAllSwitches()
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 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.
updateNodeReferences
in class Behavior
referenceTable
- a NodeReferenceTableObject that contains the
getNewObjectReference
method needed to search for
new object instances.NodeReferenceTable
,
Node.cloneTree()
,
DanglingReferenceException
Copyright © 2016–2022 SciJava. All rights reserved.