Class SphereShapeSettings

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

public class SphereShapeSettings extends ConvexShapeSettings
Settings used to construct a SphereShape.
  • Constructor Details

    • SphereShapeSettings

      public SphereShapeSettings(float radius)
      Instantiate settings for the specified radius.
      Parameters:
      radius - the desired radius (≥0)
    • SphereShapeSettings

      public SphereShapeSettings(float radius, ConstPhysicsMaterial material)
      Instantiate settings for the specified radius and material.
      Parameters:
      radius - the desired radius (≥0)
      material - the desired surface properties (not null, unaffected) or null for default properties (default=null)
  • Method Details

    • getRadius

      public float getRadius()
      Return the radius of the sphere. The settings are unaffected. (native attribute: mRadius)
      Returns:
      the radius (≥0)
    • setRadius

      public void setRadius(float radius)
      Alter the radius of the sphere. (native attribute: mRadius)
      Parameters:
      radius - the desired radius