Class CylinderShapeSettings

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

public class CylinderShapeSettings extends ConvexShapeSettings
Settings used to construct a CylinderShape.
  • Constructor Details

    • CylinderShapeSettings

      public CylinderShapeSettings(float halfHeight, float radius)
      Instantiate settings for the specified dimensions.
      Parameters:
      halfHeight - half the desired height
      radius - the desired radius of the cylinder
    • CylinderShapeSettings

      public CylinderShapeSettings(float halfHeight, float radius, float convexRadius)
      Instantiate settings for the specified dimensions.
      Parameters:
      halfHeight - half the desired height of the cylinder
      radius - the desired radius of the cylinder
      convexRadius - the desired convex radius (default=0.05)
    • CylinderShapeSettings

      public CylinderShapeSettings(float halfHeight, float radius, float convexRadius, PhysicsMaterial material)
      Instantiate settings for the specified dimensions and material.
      Parameters:
      halfHeight - half the desired height of the cylinder
      radius - the desired radius of the cylinder
      convexRadius - the desired convex radius (default=0.05)
      material - the desired material (default=null)
  • Method Details

    • getConvexRadius

      public float getConvexRadius()
      Return the convex radius. The settings are unaffected. (native attribute: mConvexRadius)
      Returns:
      the convex radius (≥0)
    • getHalfHeight

      public float getHalfHeight()
      Return the half height. The settings are unaffected. (native attribute: mHalfHeight)
      Returns:
      half the height
    • getRadius

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

      public void setConvexRadius(float radius)
      Alter the convex radius. (native attribute: mConvexRadius)
      Parameters:
      radius - the desired convex radius (≥0, default=0.05)
    • setHalfHeight

      public void setHalfHeight(float halfHeight)
      Alter the half height. (native attribute: mHalfHeight)
      Parameters:
      halfHeight - one half of the desired height (≥0)
    • setRadius

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