Class OffsetCenterOfMassShape

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

public class OffsetCenterOfMassShape extends DecoratedShape
Translate the center of mass of a child shape.
  • Constructor Details

    • OffsetCenterOfMassShape

      public OffsetCenterOfMassShape(ConstShape baseShape, Vec3Arg offset)
      Instantiate a shape on the specified offset and base shape.
      Parameters:
      baseShape - the base shape (not null)
      offset - (not null, unaffected)
  • Method Details

    • getOffset

      public Vec3 getOffset()
      Copy the shape's offset relative to the base shape. The shape is unaffected.
      Returns:
      a new, mutable offset vector