java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ChbFace
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
A triangular face in a
ConvexHullBuilder
. (native type:
ConvexHullBuilder::Face
)-
Method Summary
Modifier and TypeMethodDescriptionReturn the centroid of the face.Access the first edge of the face.Return the normal of the face.boolean
Test whether the face is facing the specified point.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
getCentroid
Return the centroid of the face. The face is unaffected. (native attribute: mCentroid)- Returns:
- a new location vector
-
getFirstEdge
Access the first edge of the face. The face is unaffected. (native attribute: mFirstEdge)- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if none
-
getNormal
Return the normal of the face. The face is unaffected. (native attribute: mNormal)- Returns:
- a new vector whose length is 2 times the area of the face
-
isFacing
Test whether the face is facing the specified point. The face is unaffected.- Parameters:
point
- the location to test (not null, unaffected)- Returns:
true
if facing the test point, otherwisefalse
-