Interface ConstCollideShapeResult
- All Superinterfaces:
Comparable<ConstJoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
CollideShapeResult,ShapeCastResult
Read-only access to a
CollideShapeResult. (native type: const
CollideShapeResult)-
Method Summary
Modifier and TypeMethodDescriptionIdentify 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.Identify the face on shape 1 where the collision occurred.Identify 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, va
-
Method Details
-
getBodyId2
BodyId getBodyId2()Identify the body to which shape 2 belongs. The object is unaffected.- Returns:
- a new ID
-
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
SubShapeId getSubShapeId1()Identify the face on shape 1 where the collision occurred. The object is unaffected.- Returns:
- a new ID
-
getSubShapeId2
SubShapeId getSubShapeId2()Identify the face on shape 2 where the collision occurred. The object is unaffected.- Returns:
- a new ID
-