Class RotatedTranslatedShape

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

public class RotatedTranslatedShape extends DecoratedShape
Apply rotation followed by translation to an existing Shape to create a new shape.
  • Constructor Details

    • RotatedTranslatedShape

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

    • getPosition

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

      public Quat getRotation()
      Copy the shape's rotation relative to the base shape. The shape is unaffected.
      Returns:
      a new, mutable rotation quaternion