java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.OrientedBox
All Implemented Interfaces:
ConstJoltPhysicsObject, ConstOrientedBox, AutoCloseable, Comparable<JoltPhysicsObject>

public final class OrientedBox extends JoltPhysicsObject implements ConstOrientedBox
A 3-D box that has been rotated and translated.
  • Constructor Details

    • OrientedBox

      public OrientedBox()
      Instantiate a default box.
    • OrientedBox

      public OrientedBox(Mat44Arg orientation, Vec3Arg halfExtents)
      Instantiate a box with the specified transform and half extents.
      Parameters:
      orientation - the desired rotation and translation (not null, unaffected)
      halfExtents - the desired half-extent on each local axis (not null, unaffected)
  • Method Details

    • getHalfExtents

      public Vec3 getHalfExtents()
      Copy the (half) extent of the box on each local axis. The box is unaffected. (native attribute: mHalfExtents)
      Specified by:
      getHalfExtents in interface ConstOrientedBox
      Returns:
      a new vector
    • getOrientation

      public Mat44 getOrientation()
      Copy the transform that translates and rotates the local-space axes to world space. The box is unaffected. (native attribute: mOrientation)
      Specified by:
      getOrientation in interface ConstOrientedBox
      Returns:
      a new matrix