Interface ConstContactManifold
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
ContactManifold
Read-only access to a
ContactManifold
. (native type: const
ContactManifold)-
Method Summary
Modifier and TypeMethodDescriptionCopy the location from which all contact points are measured.float
Return the penetration depth: the distance to move body 2 out of collision.int
Return the ID of the first sub-shape that formed the manifold.int
Return the ID of the 2nd sub-shape that formed the manifold.Copy the normal: the direction to move body 2 out of collision.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getBaseOffset
RVec3 getBaseOffset()Copy the location from which all contact points are measured. The manifold is unaffected.- Returns:
- a new location vector
-
getPenetrationDepth
float getPenetrationDepth()Return the penetration depth: the distance to move body 2 out of collision. The manifold is unaffected.- Returns:
- the signed distance (negative for a speculative contact)
-
getSubShapeId1
int getSubShapeId1()Return the ID of the first sub-shape that formed the manifold. The manifold is unaffected.- Returns:
- a
SubShapeID
value
-
getSubShapeId2
int getSubShapeId2()Return the ID of the 2nd sub-shape that formed the manifold. The manifold is unaffected.- Returns:
- a
SubShapeID
value
-
getWorldSpaceNormal
Vec3 getWorldSpaceNormal()Copy the normal: the direction to move body 2 out of collision. The manifold is unaffected.- Returns:
- a new direction vector (in system coordinates)
-