Package com.github.stephengold.joltjni
Class IndexedTriangleNoMaterial
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.IndexedTriangleNoMaterial
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
IndexedTriangle
A triangle composed of three 32-bit mesh-vertex indices.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a triangle with all indices zero.IndexedTriangleNoMaterial
(int vi0, int vi1, int vi2) Instantiate a triangle with the specified indices. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
IndexedTriangleNoMaterial
public IndexedTriangleNoMaterial()Instantiate a triangle with all indices zero. -
IndexedTriangleNoMaterial
public IndexedTriangleNoMaterial(int vi0, int vi1, int vi2) Instantiate a triangle with the specified indices.- Parameters:
vi0
- the desired first mesh-vertex indexvi1
- the desired 2nd mesh-vertex indexvi2
- the desired 3rd mesh-vertex index
-
-
Method Details
-
getIdx
public int getIdx(int cornerIndex) Return the mesh-vertex index of the specified corner.- Parameters:
cornerIndex
- which corner to access (0, 1, or 2)- Returns:
- the mesh-vertex index
-
setIdx
public void setIdx(int cornerIndex, int meshVertexIndex) Alter the mesh-vertex index of the specified corner.- Parameters:
cornerIndex
- which corner to modify (0, 1, or 2)meshVertexIndex
- the desired mesh-vertex index
-