Class ConvexShapeSettings

All Implemented Interfaces:
ConstConvexShapeSettings, ConstJoltPhysicsObject, ConstShapeSettings, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
BoxShapeSettings, CapsuleShapeSettings, ConvexHullShapeSettings, CylinderShapeSettings, SphereShapeSettings, TaperedCapsuleShapeSettings, TaperedCylinderShapeSettings, TriangleShapeSettings

public abstract class ConvexShapeSettings extends ShapeSettings implements ConstConvexShapeSettings
Settings used to construct a ConvexShape.
  • Method Details

    • setDensity

      public void setDensity(float density)
      Alter the shape's density.
      Parameters:
      density - the desired density (in kilograms per cubic meter, default=1000)
    • setMaterial

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

      public float getDensity()
      Return the density. The settings are unaffected. (native attribute: mDensity)
      Specified by:
      getDensity in interface ConstConvexShapeSettings
      Returns:
      the value
    • getMaterial

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