Interface ConstCollideShapeResult
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
CollideShapeResult,ShapeCastResult
Read-only access to a
CollideShapeResult. (native type: const
CollideShapeResult)-
Method Summary
Modifier and TypeMethodDescriptionintIdentify the body to which shape 2 belongs.Copy the contact location on the surface of shape 1.Copy the contact location on the surface of shape 2.Copy the direction to move shape 2 out of collision along the shortest path.floatReturn the distance to move shape 2 to resolve the collision.intIdentify the face on shape 1 where the collision occurred.intIdentify the face on shape 2 where the collision occurred.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getBodyId2
int getBodyId2()Identify the body to which shape 2 belongs. The object is unaffected.- Returns:
- the
BodyIDvalue
-
getContactPointOn1
Vec3 getContactPointOn1()Copy the contact location on the surface of shape 1. The object is unaffected.- Returns:
- a new location vector
-
getContactPointOn2
Vec3 getContactPointOn2()Copy the contact location on the surface of shape 2. The object is unaffected.- Returns:
- a new location vector
-
getPenetrationAxis
Vec3 getPenetrationAxis()Copy the direction to move shape 2 out of collision along the shortest path. The object is unaffected.- Returns:
- a new direction vector in system coordinates
-
getPenetrationDepth
float getPenetrationDepth()Return the distance to move shape 2 to resolve the collision. The object is unaffected.- Returns:
- the signed distance
-
getSubShapeId1
int getSubShapeId1()Identify the face on shape 1 where the collision occurred. The object is unaffected.- Returns:
- a
SubShapeIDvalue (typically negative)
-
getSubShapeId2
int getSubShapeId2()Identify the face on shape 2 where the collision occurred. The object is unaffected.- Returns:
- a
SubShapeIDvalue (typically negative)
-