Class ShapeCastSettings

All Implemented Interfaces:
ConstCollideSettingsBase, ConstJoltPhysicsObject, ConstShapeCastSettings, AutoCloseable, Comparable<JoltPhysicsObject>

public class ShapeCastSettings extends CollideSettingsBase implements ConstShapeCastSettings
Configurable options for a shape-cast query.
  • Constructor Details

    • ShapeCastSettings

      public ShapeCastSettings()
      Instantiate default settings.
    • ShapeCastSettings

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

    • set

      public void set(ConstShapeCastSettings source)
      Copy the argument to the current settings.
      Parameters:
      source - the settings to copy (not null, unaffected)
    • setBackFaceModeConvex

      public void setBackFaceModeConvex(EBackFaceMode mode)
      Alter the treatment of 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)
    • setExtraConvexRadius

      public void setExtraConvexRadius(float margin)
      Alter the extra thickness for enlarging the query shape. (native attribute: mExtraConvexRadius)
      Parameters:
      margin - the desired extra margin (default=0)
    • setReturnDeepestPoint

      public void setReturnDeepestPoint(boolean enable)
      Alter whether to calculate penetration for the starting point. (native attribute: mReturnDeepestPoint)
      Parameters:
      enable - true to enable the feature, false to disable it (default=false)
    • setUseShrunkenShapeAndConvexRadius

      public void setUseShrunkenShapeAndConvexRadius(boolean enable)
      Alter whether the shape should be shrunk and then expanded by the convex radius. (native attribute: mUseShrunkenShapeAndConvexRadius)
      Parameters:
      enable - true to enable the feature, false to disable it (default=false)
    • getBackFaceModeConvex

      public EBackFaceMode getBackFaceModeConvex()
      Return the policy for back-facing triangles in convex shapes. The settings are unaffected. (native attribute: mBackFaceModeConvex)
      Specified by:
      getBackFaceModeConvex in interface ConstShapeCastSettings
      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)
      Specified by:
      getBackFaceModeTriangles in interface ConstShapeCastSettings
      Returns:
      the enum value (not null)
    • getExtraConvexRadius

      public float getExtraConvexRadius()
      Return the extra thickness for enlarging the query shape. The settings are unaffected. (native attribute: mExtraConvexRadius)
      Specified by:
      getExtraConvexRadius in interface ConstShapeCastSettings
      Returns:
      the extra margin (in meters)
    • getReturnDeepestPoint

      public boolean getReturnDeepestPoint()
      Test whether to calculate penetration for the starting point. The settings are unaffected. (native attribute: mReturnDeepestPoint)
      Specified by:
      getReturnDeepestPoint in interface ConstShapeCastSettings
      Returns:
      true to enable, false to disable
    • getUseShrunkenShapeAndConvexRadius

      public boolean getUseShrunkenShapeAndConvexRadius()
      Test whether the shape should be shrunk and then expanded by the convex radius. The settings are unaffected. (native attribute: mUseShrunkenShapeAndConvexRadius)
      Specified by:
      getUseShrunkenShapeAndConvexRadius in interface ConstShapeCastSettings
      Returns:
      true to enable, false to disable