Interface ConstSoftBodyVertex
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
SoftBodyVertex
Read-only access to
SoftBodyVertex
. (native type: const
SoftBodyMotionProperties::Vertex)-
Method Summary
Modifier and TypeMethodDescriptionint
Return the index of the colliding shape.Copy the collision plane.float
Return the inverse mass.float
Return the amount of penetration.Copy the location.Copy the velocity.boolean
Test whether the vertex collided during the previous 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
-
getCollidingShapeIndex
int getCollidingShapeIndex()Return the index of the colliding shape. The vertex is unaffected.- Returns:
- the index
-
getCollisionPlane
Plane getCollisionPlane()Copy the collision plane. The vertex is unaffected.- Returns:
- a new object
-
getInvMass
float getInvMass()Return the inverse mass. The vertex is unaffected.- Returns:
- the inverse of the mass (in 1/kilograms)
-
getLargestPenetration
float getLargestPenetration()Return the amount of penetration. The vertex is unaffected.- Returns:
- the depth (in meters)
-
getPosition
Vec3 getPosition()Copy the location. The vertex is unaffected.- Returns:
- a new location vector (relative to the body's center of mass)
-
getVelocity
Vec3 getVelocity()Copy the velocity. The vertex is unaffected.- Returns:
- a new velocity vector (relative to the body's center of mass, in meters per second)
-
hasContact
boolean hasContact()Test whether the vertex collided during the previous update. The vertex is unaffected.- Returns:
true
if it collided, otherwisefalse
-