java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.RayCastSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstRayCastSettings,AutoCloseable,Comparable<JoltPhysicsObject>
Configurable options for a ray-cast query.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.RayCastSettings(ConstRayCastSettings original) Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionReturn the policy for back-facing triangles in convex shapes.Return the policy for back-facing triangles in triangle-based shapes.booleanTest whether convex shapes should be treated as solid.voidset(ConstRayCastSettings source) Copy the argument to the current settings.voidAlter the policy for back-facing triangles in convex shapes.voidAlter the policy for back-facing triangles in triangle-based shapes.voidsetTreatConvexAsSolid(boolean setting) Alter whether convex shapes should be treated as solid.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, targetVaOrZero, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa, targetVaOrZero
-
Constructor Details
-
RayCastSettings
public RayCastSettings()Instantiate default settings. -
RayCastSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
set
Copy the argument to the current settings.- Parameters:
source- the settings to copy (notnull, unaffected)
-
setBackFaceModeConvex
Alter the policy for back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)- Parameters:
mode- the desired mode (notnull, default=IgnoreBackFaces)
-
setBackFaceModeTriangles
Alter the policy for back-facing triangles in triangle-based shapes. (native attribute: mBackFaceModeTriangles)- Parameters:
mode- the desired mode (notnull, default=IgnoreBackFaces)
-
setTreatConvexAsSolid
public void setTreatConvexAsSolid(boolean setting) Alter whether convex shapes should be treated as solid. (native attribute: mTreatConvexAsSolid)- Parameters:
setting-true→ solid,false→ hollow (default=true)
-
getBackFaceModeConvex
Return the policy for back-facing triangles in convex shapes. The settings are unaffected. (native attribute: mBackFaceModeConvex)- Specified by:
getBackFaceModeConvexin interfaceConstRayCastSettings- Returns:
- the enum value (not
null)
-
getBackFaceModeTriangles
Return the policy for back-facing triangles in triangle-based shapes. The settings are unaffected. (native attribute: mBackFaceModeTriangles)- Specified by:
getBackFaceModeTrianglesin interfaceConstRayCastSettings- Returns:
- the enum value (not
null)
-
getTreatConvexAsSolid
public boolean getTreatConvexAsSolid()Test whether convex shapes should be treated as solid. The settings are unaffected. (native attribute: mTreatConvexAsSolid)- Specified by:
getTreatConvexAsSolidin interfaceConstRayCastSettings- Returns:
trueif treated as solid, otherwisefalse
-