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

public class IndexedTriangleNoMaterial extends JoltPhysicsObject
A triangle composed of three 32-bit mesh-vertex indices.
  • 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 index
      vi1 - the desired 2nd mesh-vertex index
      vi2 - 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