Class PlaneShapeSettings

All Implemented Interfaces:
ConstJoltPhysicsObject, ConstShapeSettings, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public class PlaneShapeSettings extends ShapeSettings
Settings used to construct a PlaneShape.
  • Field Details

    • cDefaultHalfExtent

      public static final float cDefaultHalfExtent
      default half-extent for the PlaneShape
      See Also:
  • Constructor Details

    • PlaneShapeSettings

      public PlaneShapeSettings(ConstPlane plane)
      Instantiate settings for the specified plane.
      Parameters:
      plane - the desired surface plane (not null, unaffected)
    • PlaneShapeSettings

      public PlaneShapeSettings(ConstPlane plane, ConstPhysicsMaterial material)
      Instantiate settings for the specified plane and material.
      Parameters:
      plane - the desired surface plane (not null, unaffected)
      material - the desired surface properties (not null, unaffected) or null for default properties (default=null)
    • PlaneShapeSettings

      public PlaneShapeSettings(ConstPlane plane, ConstPhysicsMaterial material, float halfExtent)
      Instantiate settings for the specified plane, material, and extent.
      Parameters:
      plane - the desired surface plane (not null, unaffected)
      material - the desired surface properties (not null, unaffected) or null for default properties (default=null)
      halfExtent - the desired radius of the bounding box (>0, default=1000)
  • Method Details

    • getHalfExtent

      public float getHalfExtent()
      Return the half extent. The settings are unaffected. (native attribute: mHalfExtent)
      Returns:
      half the extent
    • getMaterial

      public ConstPhysicsMaterial getMaterial()
      Return the material. The settings are unaffected. (native attribute: mMaterial)
      Returns:
      a new JVM object with the pre-existing native object assigned, or null if none
    • getPlane

      public Plane getPlane()
      Copy the surface equation. The settings are unaffected. (native attribute: mPlane)
      Returns:
      a new Plane
    • setHalfExtent

      public void setHalfExtent(float halfExtent)
      Alter the plane's extent. (native attribute: mHalfExtent)
      Parameters:
      halfExtent - one-half of the desired extent
    • setMaterial

      public void setMaterial(ConstPhysicsMaterial material)
      Replace the material. (native attribute: mMaterial)
      Parameters:
      material - the desired material, or null if none (default=null)
    • setPlane

      public void setPlane(ConstPlane plane)
      Alter the surface equation. (native attribute: mPlane)
      Parameters:
      plane - the desired surface (not null, unaffected)