|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.WakeupCondition
javax.media.j3d.WakeupCriterion
javax.media.j3d.WakeupOnCollisionEntry
public final class WakeupOnCollisionEntry
Class specifying a wakeup when the specified object collides with any other object in the scene graph.
Field Summary | |
---|---|
(package private) int |
accuracyMode
Accuracy mode one of USE_GEOMETRY or USE_BOUNDS |
(package private) Bounds |
armingBounds
|
(package private) NodeRetained |
armingNode
|
(package private) SceneGraphPath |
armingPath
|
(package private) static int |
BOUND
|
(package private) BoundingLeafRetained |
boundingLeaf
|
(package private) static int |
BOUNDINGLEAF
|
(package private) static int |
COLLIDEENTRY_IN_BS_LIST
|
(package private) Bounds |
collidingBounds
|
(package private) SceneGraphPath |
collidingPath
|
(package private) static int |
COND_IN_GS_LIST
|
(package private) UnorderList |
geometryAtoms
Geometry atoms that this wakeup condition refer to. |
(package private) static int |
GROUP
|
(package private) static int |
MORPH
|
(package private) int |
nodeType
|
(package private) static int |
ORIENTEDSHAPE3D
|
(package private) static int |
SHAPE
|
(package private) static int |
TOTAL_INDEXED_UNORDER_SET_TYPES
|
static int |
USE_BOUNDS
Use geometric bounds as an approximation in computing collisions. |
static int |
USE_GEOMETRY
Use geometry in computing collisions. |
(package private) Bounds |
vwcBounds
|
Fields inherited from class javax.media.j3d.WakeupCriterion |
---|
triggered |
Fields inherited from class javax.media.j3d.WakeupCondition |
---|
ALL_ELEMENTS, allEnum, behav, conditionMet, id, listIdx, parent, trigEnum, TRIGGERED_ELEMENTS |
Constructor Summary | |
---|---|
WakeupOnCollisionEntry(Bounds armingBounds)
Constructs a new WakeupOnCollisionEntry criterion. |
|
WakeupOnCollisionEntry(Node armingNode)
Constructs a new WakeupOnCollisionEntry criterion. |
|
WakeupOnCollisionEntry(Node armingNode,
int speedHint)
Constructs a new WakeupOnCollisionEntry criterion. |
|
WakeupOnCollisionEntry(SceneGraphPath armingPath)
Constructs a new WakeupOnCollisionEntry criterion with USE_BOUNDS for a speed hint. |
|
WakeupOnCollisionEntry(SceneGraphPath armingPath,
int speedHint)
Constructs a new WakeupOnCollisionEntry criterion. |
|
WakeupOnCollisionEntry(SceneGraphPath armingPath,
int speedHint,
Bounds armingBounds)
Constructs a new WakeupOnCollisionEntry criterion. |
Method Summary | |
---|---|
(package private) void |
addBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. |
Bounds |
getArmingBounds()
Returns the bounds object used in specifying the collision condition. |
SceneGraphPath |
getArmingPath()
Returns the path used in specifying the collision condition. |
(package private) static int |
getNodeType(NodeRetained armingNode,
SceneGraphPath armingPath,
java.lang.String s)
Node legality checker throw Exception if node is not legal. |
(package private) static SceneGraphPath |
getSceneGraphPath(GroupRetained group)
|
(package private) static SceneGraphPath |
getSceneGraphPath(NodeRetained startNode,
HashKey key,
Transform3D transform)
return the SceneGraphPath of the geomAtom. |
Bounds |
getTriggeringBounds()
Retrieves the Bounds object that caused the collision |
(package private) static Bounds |
getTriggeringBounds(GroupRetained group)
Return the TriggeringBounds for node |
(package private) static Bounds |
getTriggeringBounds(Shape3DRetained mirrorShape)
Return the TriggeringBounds for node |
SceneGraphPath |
getTriggeringPath()
Retrieves the path describing the object causing the collision. |
(package private) void |
removeBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. |
(package private) void |
resetBehaviorCondition(BehaviorStructure bs)
Perform task in addBehaviorCondition() that has to be set every time the condition met. |
(package private) void |
setTarget(BHLeafInterface leaf)
|
(package private) void |
setTriggered()
Set the Criterion's trigger flag to true. |
(package private) void |
updateCollisionBounds(boolean reEvaluateGAs)
|
(package private) static void |
validateSpeedHint(int speedHint,
java.lang.String s)
speedHint legality checker throw Exception if speedHint is not legal |
Methods inherited from class javax.media.j3d.WakeupCriterion |
---|
buildTree, cleanTree, hasTriggered, resetTree |
Methods inherited from class javax.media.j3d.WakeupCondition |
---|
allElements, reInsertElapseTimeCond, setConditionMet, triggeredElements |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int COND_IN_GS_LIST
static final int COLLIDEENTRY_IN_BS_LIST
static final int TOTAL_INDEXED_UNORDER_SET_TYPES
public static final int USE_GEOMETRY
public static final int USE_BOUNDS
static final int GROUP
static final int BOUNDINGLEAF
static final int SHAPE
static final int MORPH
static final int ORIENTEDSHAPE3D
static final int BOUND
int accuracyMode
NodeRetained armingNode
Bounds vwcBounds
BoundingLeafRetained boundingLeaf
UnorderList geometryAtoms
int nodeType
SceneGraphPath armingPath
Bounds armingBounds
Bounds collidingBounds
SceneGraphPath collidingPath
Constructor Detail |
---|
public WakeupOnCollisionEntry(SceneGraphPath armingPath)
armingPath
- the path used to arm collision
detection
java.lang.IllegalArgumentException
- if object associated with the
SceneGraphPath is other than a Group, Shape3D, Morph, or
BoundingLeaf node.public WakeupOnCollisionEntry(SceneGraphPath armingPath, int speedHint)
armingPath
- the path used to arm collision
detectionspeedHint
- one of USE_GEOMETRY or USE_BOUNDS, specifies how
accurately Java 3D will perform collision detection
java.lang.IllegalArgumentException
- if hint is not one of
USE_GEOMETRY or USE_BOUNDS.
java.lang.IllegalArgumentException
- if object associated with the
SceneGraphPath is other than a Group, Shape3D, Morph, or
BoundingLeaf node.public WakeupOnCollisionEntry(Node armingNode)
armingNode
- the Group, Shape, or Morph node used to
arm collision detection
java.lang.IllegalArgumentException
- if object is under a
SharedGroup node or object is other than a Group, Shape3D,
Morph or BoundingLeaf node.public WakeupOnCollisionEntry(Node armingNode, int speedHint)
armingNode
- the Group, Shape, or Morph node used to
arm collision detectionspeedHint
- one of USE_GEOMETRY or USE_BOUNDS, specifies how
accurately Java 3D will perform collision detection
java.lang.IllegalArgumentException
- if hint is not one of
USE_GEOMETRY or USE_BOUNDS.
java.lang.IllegalArgumentException
- if object is under a
SharedGroup node or object is other than a Group, Shape3D,
Morph or BoundingLeaf node.public WakeupOnCollisionEntry(Bounds armingBounds)
armingBounds
- the bounds object used to arm collision
detectionWakeupOnCollisionEntry(SceneGraphPath armingPath, int speedHint, Bounds armingBounds)
armingPath
- the path used to arm collision
detectionspeedHint
- one of USE_GEOMETRY or USE_BOUNDS, specifies how
accurately Java 3D will perform collision detectionarmingBounds
- the bounds object used to arm collision
detection
java.lang.IllegalArgumentException
- if hint is not one of
USE_GEOMETRY or USE_BOUNDS.
java.lang.IllegalArgumentException
- if object associated with the
SceneGraphPath is other than a Group, Shape3D, Morph, or
BoundingLeaf node.Method Detail |
---|
public SceneGraphPath getArmingPath()
public Bounds getArmingBounds()
public SceneGraphPath getTriggeringPath()
java.lang.IllegalStateException
- if not called from within the
a behavior's processStimulus method which was awoken by a collision.public Bounds getTriggeringBounds()
java.lang.IllegalStateException
- if not called from within the
a behavior's processStimulus method which was awoken by a collision.static int getNodeType(NodeRetained armingNode, SceneGraphPath armingPath, java.lang.String s) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
static void validateSpeedHint(int speedHint, java.lang.String s) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
void addBehaviorCondition(BehaviorStructure bs)
addBehaviorCondition
in class WakeupCriterion
void removeBehaviorCondition(BehaviorStructure bs)
removeBehaviorCondition
in class WakeupCriterion
void setTarget(BHLeafInterface leaf)
void updateCollisionBounds(boolean reEvaluateGAs)
static Bounds getTriggeringBounds(Shape3DRetained mirrorShape)
static Bounds getTriggeringBounds(GroupRetained group)
static SceneGraphPath getSceneGraphPath(GroupRetained group)
static SceneGraphPath getSceneGraphPath(NodeRetained startNode, HashKey key, Transform3D transform)
void setTriggered()
WakeupCriterion
setTriggered
in class WakeupCriterion
void resetBehaviorCondition(BehaviorStructure bs)
resetBehaviorCondition
in class WakeupCriterion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |