Class TaperedCapsuleShapeSettings

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

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

    • TaperedCapsuleShapeSettings

      public TaperedCapsuleShapeSettings(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
      bottomRadius - the desired bottom radius
    • TaperedCapsuleShapeSettings

      public TaperedCapsuleShapeSettings(float halfHeight, float topRadius, float bottomRadius, 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
      bottomRadius - the desired bottom radius
      material - the desired material (default=null)
  • Method Details

    • getBottomRadius

      public float getBottomRadius()
      Return the bottom radius of the cylinder. The settings are unaffected. (native attribute: mBottomRadius)
      Returns:
      the bottom radius (≥0)
    • getHalfHeightOfTaperedCylinder

      public float getHalfHeightOfTaperedCylinder()
      Return the half height of the tapered cylinder. The settings are unaffected. (native attribute: mHalfHeightOfTaperedCylinder)
      Returns:
      half the height
    • getTopRadius

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

      public void setBottomRadius(float radius)
      Alter the bottom radius of the cylinder. (native attribute: mBottomRadius)
      Parameters:
      radius - the desired bottom radius (≥0)
    • setHalfHeightOfTaperedCylinder

      public void setHalfHeightOfTaperedCylinder(float halfHeight)
      Alter the half height of the tapered cylinder. (native attribute: mHalfHeightOfTaperedCylinder)
      Parameters:
      halfHeight - one half of the desired height (≥0)
    • setTopRadius

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