Class TaperedCylinderShapeSettings

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

public class TaperedCylinderShapeSettings extends ConvexShapeSettings
Settings used to construct a TaperedCylinderShape.
  • Constructor Details

    • TaperedCylinderShapeSettings

      public TaperedCylinderShapeSettings(float halfHeight, float topRadius, float bottomRadius)
      Instantiate settings for the specified dimensions.
      Parameters:
      halfHeight - half the desired height of the tapered cylinder
      topRadius - the desired top radius of the tapered cylinder
      bottomRadius - the desired bottom radius of the tapered cylinder
    • TaperedCylinderShapeSettings

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

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

    • getBottomRadius

      public float getBottomRadius()
      Return the bottom radius. The settings are unaffected. (native attribute: mRadius)
      Returns:
      the bottom radius of the tapered cylinder (≥0)
    • 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
    • getTopRadius

      public float getTopRadius()
      Return the top radius. The settings are unaffected. (native attribute: mTopRadius)
      Returns:
      the top radius (≥0)
    • setBottomRadius

      public void setBottomRadius(float radius)
      Alter the bottom radius. (native attribute: mBottomRadius)
      Parameters:
      radius - the desired bottom 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)
    • setTopRadius

      public void setTopRadius(float radius)
      Alter the top radius. (native attribute: mTopRadius)
      Parameters:
      radius - the desired top radius (≥0)