Interface ConstEdge
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
Edge
Read-only access to an
Edge
. (native type:
const SoftBodySharedSettings::Edge
)-
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the inverse of the spring's stiffness.float
Return the rest length of the spring.int
getVertex
(int indexInEdge) Return the mesh vertex at the specified end.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getCompliance
float getCompliance()Return the inverse of the spring's stiffness. The edge is unaffected.- Returns:
- the compliance value
-
getRestLength
float getRestLength()Return the rest length of the spring. The edge is unaffected.- Returns:
- the length (in meters)
-
getVertex
int getVertex(int indexInEdge) Return the mesh vertex at the specified end.- Parameters:
indexInEdge
- which end of the edge (0 or 1)- Returns:
- the mesh index of the vertex (≥0)
-