public class PhysicsCollisionEvent extends NativePhysicsObject
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
loggerN| Constructor and Description |
|---|
PhysicsCollisionEvent(PhysicsCollisionObject pcoA,
PhysicsCollisionObject pcoB,
long manifoldPointId)
Instantiate an event.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getAppliedImpulse()
Return the contact point's applied impulse (native field:
m_appliedImpulse).
|
float |
getAppliedImpulseLateral1()
Return the contact point's applied lateral impulse #1 (native field:
m_appliedImpulseLateral1).
|
float |
getAppliedImpulseLateral2()
Return the contact point's applied lateral impulse #2 (native field:
m_appliedImpulseLateral2).
|
float |
getCombinedFriction()
Return the contact point's combined friction, which is usually the
product of the collision-object frictions (native field:
m_combinedFriction).
|
float |
getCombinedRestitution()
Return the contact point's combined restitution, which is usually the
product of the collision-object restitutions (native field:
m_combinedRestitution).
|
float |
getCombinedRollingFriction()
Return the contact point's combined rolling friction (native field:
m_combinedRollingFriction).
|
float |
getCombinedSpinningFriction()
Return the contact point's combined spinning friction (native field:
m_combinedSpinningFriction).
|
float |
getDistance1()
Return the contact point's signed separation distance (native field:
m_distance1).
|
int |
getFlags()
Return the contact-point flags (native field: m_contactPointFlags).
|
int |
getIndex0()
Return the triangle index in the shape of object A at the point of
contact (native field: m_index0).
|
int |
getIndex1()
Return the triangle index in the shape of object B at the point of
contact (native field: m_index1).
|
Vector3f |
getLateralFrictionDir1(Vector3f storeResult)
Return the contact point's lateral friction direction #1 (native field:
m_lateralFrictionDir1).
|
Vector3f |
getLateralFrictionDir2(Vector3f storeResult)
Return the contact point's lateral friction direction #2 (native field:
m_lateralFrictionDir2).
|
int |
getLifeTime()
Return the contact point's lifetime (native name: m_lifeTime).
|
Vector3f |
getLocalPointA(Vector3f storeResult)
Return the contact point's location in the local coordinates of object A
(native name: m_localPointA).
|
Vector3f |
getLocalPointB(Vector3f storeResult)
Return the contact point's location in the local coordinates of object B
(native name: m_localPointB).
|
Vector3f |
getNormalWorldOnB(Vector3f storeResult)
Return the contact point's normal on object B in physics-space
coordinates (native name: m_normalWorldOnB).
|
PhysicsCollisionObject |
getObjectA()
Access collision object A.
|
PhysicsCollisionObject |
getObjectB()
Access collision object B.
|
int |
getPartId0()
Return the part index in the shape of object A at the point of contact
(native field: m_partId0).
|
int |
getPartId1()
Return the part index in the shape of object B at the point of contact
(native field: m_partId1).
|
Vector3f |
getPositionWorldOnA(Vector3f storeResult)
Return the contact point's location on object A in physics-space
coordinates (native field: m_positionWorldOnA).
|
Vector3f |
getPositionWorldOnB(Vector3f storeResult)
Return the contact point's location on object B in physics-space
coordinates (native field: m_positionWorldOnB).
|
boolean |
isLateralFrictionInitialized()
Test whether the contact point's lateral friction is initialized.
|
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, toString, unassignNativeObjectpublic static final java.util.logging.Logger logger
public PhysicsCollisionEvent(PhysicsCollisionObject pcoA, PhysicsCollisionObject pcoB, long manifoldPointId)
pcoA - the first involved object (not null, alias created)pcoB - the 2nd involved object (not null, alias created)manifoldPointId - the native ID of the btManifoldPoint (not zero)public PhysicsCollisionObject getObjectA()
public PhysicsCollisionObject getObjectB()
public float getAppliedImpulse()
public float getAppliedImpulseLateral1()
public float getAppliedImpulseLateral2()
public float getCombinedFriction()
public float getCombinedRestitution()
public float getCombinedRollingFriction()
public float getCombinedSpinningFriction()
public float getDistance1()
public int getFlags()
ContactPointFlagpublic int getIndex0()
If shape is convex, the index is undefined.
If shape is a CompoundCollisionShape, the index identifies a child shape.
If the shape is a GImpactCollisionShape or MeshCollisionShape, the index identifies a triangle in an IndexedMesh.
If the shape is a HeightfieldCollisionShape, the index indicates a grid column.
public int getIndex1()
If shape is convex, the index is undefined.
If shape is a CompoundCollisionShape, the index identifies a child shape.
If the shape is a GImpactCollisionShape or MeshCollisionShape, the index identifies a triangle in an IndexedMesh.
If the shape is a HeightfieldCollisionShape, the index indicates a grid column.
public Vector3f getLateralFrictionDir1(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getLateralFrictionDir2(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public int getLifeTime()
public Vector3f getLocalPointA(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getLocalPointB(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getNormalWorldOnB(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public int getPartId0()
If the shape is compound or convex, the index is undefined.
If the shape is a GImpactCollisionShape or MeshCollisionShape, the index identifies an IndexedMesh.
If the shape is a HeightfieldCollisionShape, the index identifies a grid row.
public int getPartId1()
If the shape is compound or convex, the index is undefined.
If the shape is a GImpactCollisionShape or MeshCollisionShape, the index identifies an IndexedMesh.
If the shape is a HeightfieldCollisionShape, the index identifies a grid row.
public Vector3f getPositionWorldOnA(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getPositionWorldOnB(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public boolean isLateralFrictionInitialized()