Interface ConstSoftBodyManifold
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
SoftBodyManifold
Read-only access to a
SoftBodyManifold
. (native type: const
SoftBodyManifold)-
Method Summary
Modifier and TypeMethodDescriptionint
getContactBodyId
(ConstSoftBodyVertex vertex) Return the ID of the body with which the specified vertex collided.getContactNormal
(ConstSoftBodyVertex vertex) Copy the contact normal direction for the specified vertex.Copy the location of the contact point for the specified vertex.int
Count how many sensors are in contact with the soft body.int
getSensorContactBodyId
(int index) Return the ID of the specified sensor contact.Enumerate all vertices of the soft body.boolean
hasContact
(ConstSoftBodyVertex vertex) Test whether the specified vertex collided with something in this update.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getContactBodyId
Return the ID of the body with which the specified vertex collided. The manifold is unaffected.- Parameters:
vertex
- the vertex to query (not null, unaffected)- Returns:
- the
BodyID
value
-
getContactNormal
Copy the contact normal direction for the specified vertex. The manifold is unaffected.- Parameters:
vertex
- the vertex to query (not null, unaffected)- Returns:
- a new vector
-
getLocalContactPoint
Copy the location of the contact point for the specified vertex. The manifold is unaffected.- Parameters:
vertex
- the vertex to query (not null, unaffected)- Returns:
- a new location vector (in local coordinates)
-
getNumSensorContacts
int getNumSensorContacts()Count how many sensors are in contact with the soft body. The manifold is unaffected.- Returns:
- the count (≥0)
-
getSensorContactBodyId
int getSensorContactBodyId(int index) Return the ID of the specified sensor contact. The manifold is unaffected. (native method: GetSensorContactBodyID)- Parameters:
index
- among the sensor contacts (≥0)- Returns:
- the
BodyID
value
-
getVertices
ConstSoftBodyVertex[] getVertices()Enumerate all vertices of the soft body. The manifold is unaffected.- Returns:
- a new array of new JVM objects with pre-existing native objects assigned
-
hasContact
Test whether the specified vertex collided with something in this update. The manifold is unaffected.- Parameters:
vertex
- the vertex to query (not null, unaffected)- Returns:
true
if it collided, otherwisefalse
-