Package com.github.stephengold.joltjni
Class TriangleConvexSupport
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.TriangleConvexSupport
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A triangle for convex collision detection.
-
Constructor Summary
ConstructorsConstructorDescriptionTriangleConvexSupport(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3) Instantiate a triangle from vertex locations.TriangleConvexSupport(TriangleConvexSupport original) Instantiate a copy of the specified triangle. -
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
-
Constructor Details
-
TriangleConvexSupport
Instantiate a copy of the specified triangle.- Parameters:
original- the triangle to copy (notnull, unaffected)
-
TriangleConvexSupport
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
Copy the first vertex. The triangle is unaffected.- Returns:
- a new vector
-
getV2
Copy the 2nd vertex. The triangle is unaffected.- Returns:
- a new vector
-
getV3
Copy the 3rd vertex. The triangle is unaffected.- Returns:
- a new vector
-