Package com.github.stephengold.joltjni
Class RayCastSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.RayCastSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Raycast configuration options.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the policy for back-facing triangles in convex shapes.Return the policy for back-facing triangles in non-convex shapes.booleanTest whether convex shapes should be treated as solid.voidsetBackFaceModeConvex(EBackFaceMode setting) Alter the policy for back-facing triangles in convex shapes.voidsetBackFaceModeTriangles(EBackFaceMode setting) Alter the policy for back-facing triangles in non-convex 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, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
RayCastSettings
public RayCastSettings()Instantiate default settings.
-
-
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 non-convex 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:
- true if treated as solid, otherwise false
-
setBackFaceModeConvex
Alter the policy for back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)- Parameters:
setting- the enum value (not null, default=IgnoreBackFaces)
-
setBackFaceModeTriangles
Alter the policy for back-facing triangles in non-convex shapes. (native attribute: mBackFaceModeTriangles)- Parameters:
setting- the enum value (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)
-