|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.J3dStructure
javax.media.j3d.GeometryStructure
class GeometryStructure
A geometry structure is a object that organizes geometries and bounds.
Field Summary | |
---|---|
private BHNode[] |
bhNodeArr
The array of BHNode, a data pool, for passing data between GS and BHTrees. |
private int |
bhNodeBlockSize
|
private int |
bhNodeCount
|
private int |
bhNodeMax
|
private BHTree[] |
bhTreeArr
Binary Hull Tree structure for handling geometry atoms. |
private int |
bhTreeBlockSize
|
private int |
bhTreeCount
|
private int |
bhTreeMax
|
(package private) WakeupIndexedList |
collideEntryList
|
(package private) WakeupIndexedList |
collideExitList
|
private java.lang.Object |
collideListLock
A lock object to prevent concurrent collideEntryList, collideExitList using toArray() in BehaviorStructure buildTree() while clearMirror() is invoked in GeometryStructure removeNode() |
(package private) WakeupIndexedList |
collideMovementList
|
private Vector3d |
localeTrans
|
private MRSWLock |
lock
A multiple read single write Lock to sychronize access into this GeometryStructure. |
(package private) boolean |
reEvaluateWakeupCollisionGAs
|
(package private) UpdateTargets |
targets
used during Transform Processing |
private boolean |
transformMsg
|
private java.lang.Object |
visLock
A lock object to prevent concurrent getVisibleBHTree query. |
(package private) WakeupIndexedList |
wakeupOnCollisionEntry
|
(package private) WakeupIndexedList |
wakeupOnCollisionExit
|
(package private) WakeupIndexedList |
wakeupOnCollisionMovement
|
Fields inherited from class javax.media.j3d.J3dStructure |
---|
messageList, msgList, nMessage, threadData, threadType, universe, updateThread |
Constructor Summary | |
---|---|
GeometryStructure(VirtualUniverse u)
Constructor. |
Method Summary | |
---|---|
private void |
addToBhNodeArr(BHNode bhNode)
|
(package private) void |
addWakeupOnCollision(WakeupOnCollisionEntry w)
|
(package private) void |
addWakeupOnCollision(WakeupOnCollisionExit w)
|
(package private) void |
addWakeupOnCollision(WakeupOnCollisionMovement w)
|
(package private) void |
checkDuplicateEvent(WakeupOnCollisionMovement wmove,
Bounds bound,
BHLeafInterface hitNode)
Check for duplicate WakeupOnCollisionMovement event. |
(package private) void |
cleanup()
Release resource associate with this structure before GC We need to clear all those IndexedUnorderSet/WakeupIndexedList so that the listIdx associate with IndexedObject reset to -1. |
private void |
clearBhNodeArr()
|
(package private) BHLeafInterface |
collide(Locale locale,
int accurancyMode,
UnorderList geomAtoms,
Bounds bound,
BoundingLeafRetained boundingLeaf,
NodeRetained armingNode,
WakeupCriterion cond)
check if either the geomAtoms[] or bound or boundingLeaf collide with BHTree. |
private int |
getBHTreeIndex(Locale locale)
|
private int |
getOrAddBHTreeIndex(Locale locale)
|
(package private) boolean |
getVisibleBHTrees(RenderBin rBin,
BoundingBox frustumBBox,
Locale locale,
long referenceTime,
boolean stateChanged,
int visibilityPolicy)
|
private void |
insertNodes(java.lang.Object[] nodes)
|
(package private) GeometryAtom[] |
pickAll(Locale locale,
PickShape shape)
|
(package private) GeometryAtom |
pickAny(Locale locale,
PickShape shape)
|
private void |
processBoundsChanged(java.lang.Object[] nodes,
boolean transformChanged)
|
(package private) void |
processCollisionDetection()
This method test all wakeupOnCollision list and trigger the condition if collision occurs. |
(package private) void |
processMessages(long referenceTime)
This gets overriden by the structure |
private void |
processSwitchChanged(J3dMessage m)
This processes a switch change. |
private void |
processTransformChanged(UpdateTargets targets)
|
private void |
processVisibleChanged(java.lang.Object valueObj,
GeometryAtom[] gaArr)
|
(package private) void |
removeNodes(J3dMessage m)
This is used by MasterControl to process any unused message for final cleanup. |
(package private) void |
removeWakeupOnCollision(WakeupOnCollisionEntry wentry)
|
(package private) void |
removeWakeupOnCollision(WakeupOnCollisionExit wexit)
|
(package private) void |
removeWakeupOnCollision(WakeupOnCollisionMovement wmovement)
|
(package private) void |
resetConditionMet()
This prevents wakeupCondition sent out message and set conditionMet to true but the BehaviorStructure/BehaviorScheduler is not fast enough to process the message and reset conditionMet to false when view deactivate/unregister. |
Methods inherited from class javax.media.j3d.J3dStructure |
---|
addMessage, clearMessages, getMessages, getNumMessage, getUpdateThreadData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
UpdateTargets targets
private MRSWLock lock
private java.lang.Object visLock
private java.lang.Object collideListLock
private BHTree[] bhTreeArr
private int bhTreeCount
private int bhTreeMax
private int bhTreeBlockSize
private BHNode[] bhNodeArr
private int bhNodeCount
private int bhNodeMax
private int bhNodeBlockSize
private Vector3d localeTrans
WakeupIndexedList collideEntryList
WakeupIndexedList collideExitList
WakeupIndexedList collideMovementList
WakeupIndexedList wakeupOnCollisionEntry
WakeupIndexedList wakeupOnCollisionExit
WakeupIndexedList wakeupOnCollisionMovement
boolean reEvaluateWakeupCollisionGAs
private boolean transformMsg
Constructor Detail |
---|
GeometryStructure(VirtualUniverse u)
Method Detail |
---|
void processMessages(long referenceTime)
J3dStructure
processMessages
in class J3dStructure
private int getBHTreeIndex(Locale locale)
private int getOrAddBHTreeIndex(Locale locale)
private void clearBhNodeArr()
private void addToBhNodeArr(BHNode bhNode)
private void processVisibleChanged(java.lang.Object valueObj, GeometryAtom[] gaArr)
private void insertNodes(java.lang.Object[] nodes)
void removeNodes(J3dMessage m)
J3dStructure
removeNodes
in class J3dStructure
private void processBoundsChanged(java.lang.Object[] nodes, boolean transformChanged)
private void processTransformChanged(UpdateTargets targets)
boolean getVisibleBHTrees(RenderBin rBin, BoundingBox frustumBBox, Locale locale, long referenceTime, boolean stateChanged, int visibilityPolicy)
GeometryAtom[] pickAll(Locale locale, PickShape shape)
GeometryAtom pickAny(Locale locale, PickShape shape)
void addWakeupOnCollision(WakeupOnCollisionEntry w)
void addWakeupOnCollision(WakeupOnCollisionExit w)
void addWakeupOnCollision(WakeupOnCollisionMovement w)
void removeWakeupOnCollision(WakeupOnCollisionEntry wentry)
void removeWakeupOnCollision(WakeupOnCollisionExit wexit)
void removeWakeupOnCollision(WakeupOnCollisionMovement wmovement)
void processCollisionDetection()
void checkDuplicateEvent(WakeupOnCollisionMovement wmove, Bounds bound, BHLeafInterface hitNode)
BHLeafInterface collide(Locale locale, int accurancyMode, UnorderList geomAtoms, Bounds bound, BoundingLeafRetained boundingLeaf, NodeRetained armingNode, WakeupCriterion cond)
void resetConditionMet()
private void processSwitchChanged(J3dMessage m)
void cleanup()
J3dStructure
cleanup
in class J3dStructure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |