Package com.github.stephengold.joltjni
Class IndexedTriangleNoMaterial
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.IndexedTriangleNoMaterial
- All Implemented Interfaces:
ConstIndexedTriangleNoMaterial
,ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
IndexedTriangle
public class IndexedTriangleNoMaterial
extends JoltPhysicsObject
implements ConstIndexedTriangleNoMaterial
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, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
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
-
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
-
getIdx
public int getIdx(int cornerIndex) Return the mesh-vertex index of the specified corner.- Specified by:
getIdx
in interfaceConstIndexedTriangleNoMaterial
- Parameters:
cornerIndex
- which corner to access (0, 1, or 2)- Returns:
- the mesh-vertex index
-