java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ChbFace
- All Implemented Interfaces:
ConstChbFace
,ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
A triangular face in a
ConvexHullBuilder
. (native type:
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 class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
Copy the centroid of the face. The face is unaffected. (native attribute: mCentroid)- Specified by:
getCentroid
in interfaceConstChbFace
- Returns:
- a new location vector
-
getFirstEdge
Access the first edge of the face. The face is unaffected. (native attribute: mFirstEdge)- Specified by:
getFirstEdge
in interfaceConstChbFace
- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if none
-
getNormal
Copy the normal of the face. The face is unaffected. (native attribute: mNormal)- Specified by:
getNormal
in interfaceConstChbFace
- 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.- Specified by:
isFacing
in interfaceConstChbFace
- Parameters:
point
- the location to test (not null, unaffected)- Returns:
true
if facing the test point, otherwisefalse
-