Interface ConstChbFace
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
ChbFace
Read-only access to an
ChbFace
. (native type:
const ConvexHullBuilder::Face
)-
Method Summary
Modifier and TypeMethodDescriptionCopy the centroid of the face.Access the first edge of the face.Copy the normal of the face.boolean
Test whether the face is facing the specified point.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getCentroid
Vec3 getCentroid()Copy the centroid of the face. The face is unaffected.- Returns:
- a new location vector
-
getFirstEdge
ChbEdge getFirstEdge()Access the first edge of the face. The face is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if none
-
getNormal
Vec3 getNormal()Copy the normal of the face. The face is unaffected.- Returns:
- a new vector whose length is 2 times the area of the face
-
isFacing
Test whether the face is facing the specified point.- Parameters:
point
- the location to test (not null, unaffected)- Returns:
true
if facing the test point, otherwisefalse
-