Class TriangleConvexSupport

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.TriangleConvexSupport
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public final class TriangleConvexSupport extends JoltPhysicsObject
A triangle for convex collision detection.
  • Constructor Details

    • TriangleConvexSupport

      public TriangleConvexSupport(TriangleConvexSupport original)
      Instantiate a copy of the specified triangle.
      Parameters:
      original - the triangle to copy (not null, unaffected)
    • TriangleConvexSupport

      public TriangleConvexSupport(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3)
      Instantiate a triangle from vertex locations.
      Parameters:
      v1 - the desired location of the first vertex (not null, unaffected)
      v2 - the desired location of the 2nd vertex (not null, unaffected)
      v3 - the desired location of the 3rd vertex (not null, unaffected)
  • Method Details

    • getV1

      public Vec3 getV1()
      Copy the first vertex. The triangle is unaffected.
      Returns:
      a new vector
    • getV2

      public Vec3 getV2()
      Copy the 2nd vertex. The triangle is unaffected.
      Returns:
      a new vector
    • getV3

      public Vec3 getV3()
      Copy the 3rd vertex. The triangle is unaffected.
      Returns:
      a new vector