java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.RayCastSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Configurable options for a ray-cast query.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.RayCastSettings(RayCastSettings 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.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, toString, va
-
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
-
getBackFaceModeConvex
Return the policy for back-facing triangles in convex shapes. The settings are unaffected. (native attribute: mBackFaceModeConvex)- 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)- 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)- Returns:
trueif treated as solid, otherwisefalse
-
setBackFaceModeConvex
Alter the policy for back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)- Parameters:
mode- the desired mode (not null, default=IgnoreBackFaces)
-
setBackFaceModeTriangles
Alter the policy for back-facing triangles in triangle-based shapes. (native attribute: mBackFaceModeTriangles)- Parameters:
mode- the desired mode (not null, 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)
-