Interface ConstContactManifold
- All Superinterfaces:
AutoCloseable,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.floatReturn the penetration depth: the distance to move body 2 out of collision.intReturn the ID of the first sub-shape that formed the manifold.intReturn 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
compareToMethods 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
SubShapeIDvalue (typically negative)
-
getSubShapeId2
int getSubShapeId2()Return the ID of the 2nd sub-shape that formed the manifold. The manifold is unaffected.- Returns:
- a
SubShapeIDvalue (typically negative)
-
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)
-