public final class WakeupOnCollisionMovement extends WakeupCriterion
Modifier and Type | Field and Description |
---|---|
static int |
USE_BOUNDS
Use geometric bounds as an approximation in computing collisions.
|
static int |
USE_GEOMETRY
Use geometry in computing collisions.
|
Constructor and Description |
---|
WakeupOnCollisionMovement(Bounds armingBounds)
Constructs a new WakeupOnCollisionMovement criterion.
|
WakeupOnCollisionMovement(Node armingNode)
Constructs a new WakeupOnCollisionMovement criterion.
|
WakeupOnCollisionMovement(Node armingNode,
int speedHint)
Constructs a new WakeupOnCollisionMovement criterion.
|
WakeupOnCollisionMovement(SceneGraphPath armingPath)
Constructs a new WakeupOnCollisionMovement criterion.
|
WakeupOnCollisionMovement(SceneGraphPath armingPath,
int speedHint)
Constructs a new WakeupOnCollisionMovement criterion.
|
Modifier and Type | Method and Description |
---|---|
Bounds |
getArmingBounds()
Returns the bounds object used in specifying the collision condition.
|
SceneGraphPath |
getArmingPath()
Returns the path used in specifying the collision condition.
|
Bounds |
getTriggeringBounds()
Retrieves the Bounds object that caused the collision
|
SceneGraphPath |
getTriggeringPath()
Retrieves the path describing the object causing the collision.
|
hasTriggered
allElements, triggeredElements
public static final int USE_GEOMETRY
public static final int USE_BOUNDS
public WakeupOnCollisionMovement(SceneGraphPath armingPath)
armingPath
- the path used to arm collision
detectionIllegalArgumentException
- if object associated with the
SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.public WakeupOnCollisionMovement(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 detectionIllegalArgumentException
- if hint is not one of
USE_GEOMETRY or USE_BOUNDS.IllegalArgumentException
- if object associated with the
SceneGraphPath is other than a Group, Shape3D, Morph, or BoundingLeaf node.public WakeupOnCollisionMovement(Node armingNode)
armingNode
- the Group, Shape, or Morph node used to
arm collision detectionIllegalArgumentException
- if object is under a
SharedGroup node or object is other than a Group, Shape3D,
Morph or BoundingLeaf node.public WakeupOnCollisionMovement(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 detectionIllegalArgumentException
- if hint is not one of
USE_GEOMETRY or USE_BOUNDS.IllegalArgumentException
- if object is under a
SharedGroup node or object is other than a Group, Shape3D,
Morph or BoundingLeaf node.public WakeupOnCollisionMovement(Bounds armingBounds)
armingBounds
- the bounds object used to arm collision
detectionpublic SceneGraphPath getArmingPath()
public Bounds getArmingBounds()
public SceneGraphPath getTriggeringPath()
IllegalStateException
- if not called from within the
a behavior's processStimulus method which was awoken by a collision.public Bounds getTriggeringBounds()
IllegalStateException
- if not called from within the
a behavior's processStimulus method which was awoken by a collision.Copyright © 2016–2022 SciJava. All rights reserved.