Class OffsetCenterOfMassShapeSettings

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

public class OffsetCenterOfMassShapeSettings extends DecoratedShapeSettings
Settings used to construct an OffsetCenterOfMassShape.
  • Constructor Details

    • OffsetCenterOfMassShapeSettings

      public OffsetCenterOfMassShapeSettings(Vec3Arg offset, ConstShape baseShape)
      Instantiate a settings object with the specified offset and base shape.
      Parameters:
      offset - (not null, unaffected)
      baseShape - the desired base shape (not null)
    • OffsetCenterOfMassShapeSettings

      public OffsetCenterOfMassShapeSettings(Vec3Arg offset, ConstShapeSettings baseShapeSettings)
      Instantiate a settings object with the specified offset and base-shape settings.
      Parameters:
      offset - (not null, unaffected)
      baseShapeSettings - settings to create the base shape (not null)
  • Method Details

    • getOffset

      public Vec3 getOffset()
      Copy the offset relative to the base shape. The settings are unaffected. (native attribute: mOffset)
      Returns:
      a new, mutable offset vector
    • setOffset

      public void setOffset(Vec3Arg offset)
      Alter the offset relative to the base shape. (native attribute: mOffset)
      Parameters:
      offset - the desired offset vector (not null, unaffected, default=(0,0,0))