java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.Face
- All Implemented Interfaces:
ConstFace,ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A triangular element on the surface of a soft body. (native type:
SoftBodySharedSettings::Face)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn the material index.intgetVertex(int indexInFace) Return the mesh vertex at the specified corner.booleanTest whether the face is degenerate.voidsetMaterialIndex(int material) Assign the specified material to the face.voidsetVertex(int indexInFace, int indexInMesh) Assign the specified mesh vertex to the face.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
Face
public Face()Instantiate a default face.
-
-
Method Details
-
setMaterialIndex
public void setMaterialIndex(int material) Assign the specified material to the face. (native attribute: mMaterialIndex)- Parameters:
material- the index of the desired material (≥0, default=0)
-
setVertex
public void setVertex(int indexInFace, int indexInMesh) Assign the specified mesh vertex to the face. (native attribute: mVertex)- Parameters:
indexInFace- which corner of the triangle (0 or 1 or 2)indexInMesh- the index of the vertex to assign (≥0)
-
getMaterialIndex
public int getMaterialIndex()Return the material index. The face is unaffected. (native attribute: mMaterialIndex)- Specified by:
getMaterialIndexin interfaceConstFace- Returns:
- the index of the material in the body's shared settings (≥0)
-
getVertex
public int getVertex(int indexInFace) Return the mesh vertex at the specified corner. The face is unaffected. (native attribute: mVertex) -
isDegenerate
public boolean isDegenerate()Test whether the face is degenerate. The face is unaffected.- Specified by:
isDegeneratein interfaceConstFace- Returns:
trueif degenerate, otherwisefalse
-