Class RayCastSettings

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.RayCastSettings
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class RayCastSettings extends JoltPhysicsObject
Configurable options for a ray-cast query.
  • Constructor Details

    • RayCastSettings

      public RayCastSettings()
      Instantiate default settings.
    • RayCastSettings

      public RayCastSettings(RayCastSettings original)
      Instantiate a copy of the specified settings.
      Parameters:
      original - the settings to copy (not null, unaffected)
  • Method Details

    • getBackFaceModeConvex

      public EBackFaceMode 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

      public EBackFaceMode 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:
      true if treated as solid, otherwise false
    • setBackFaceModeConvex

      public void setBackFaceModeConvex(EBackFaceMode mode)
      Alter the policy for back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)
      Parameters:
      mode - the desired mode (not null, default=IgnoreBackFaces)
    • setBackFaceModeTriangles

      public void setBackFaceModeTriangles(EBackFaceMode mode)
      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)