All Superinterfaces:
Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
AaBox

public interface ConstAaBox extends ConstJoltPhysicsObject
Read-only access to an AaBox. (native type: const AABox)
  • Method Details

    • contains

      boolean contains(ConstAaBox other)
      Test whether the current box contains the argument box. The current box is unaffected.
      Parameters:
      other - the other box to check against (not null, unaffected)
      Returns:
      true if contained, otherwise false
    • contains

      boolean contains(Vec3Arg point)
      Test whether the box contains the specified point. The box is unaffected.
      Parameters:
      point - the point to test (not null, unaffected)
      Returns:
      true if contained, otherwise false
    • getCenter

      Vec3 getCenter()
      Locate the center of the box. The box is unaffected.
      Returns:
      a new location vector
    • getClosestPoint

      Vec3 getClosestPoint(Vec3Arg location)
      Locate the closest point on or in the box for the specified location. The box is unaffected.
      Parameters:
      location - the starting location (not null, unaffected)
      Returns:
      a new vector
    • getExtent

      Vec3 getExtent()
      Copy the (half) extent of the box. The box is unaffected.
      Returns:
      a new vector
    • getMax

      Vec3 getMax()
      Copy the maximum contained coordinate on each axis. The box is unaffected.
      Returns:
      a new location vector
    • getMin

      Vec3 getMin()
      Copy the minimum contained coordinate on each axis. The box is unaffected.
      Returns:
      a new location vector
    • getSize

      Vec3 getSize()
      Copy the size (full extent) on each axis. The box is unaffected.
      Returns:
      a new vector
    • getSqDistanceTo

      float getSqDistanceTo(Vec3Arg point)
      Get the squared distance between the box and the specified point.
      Parameters:
      point - the point to measure from (not null, unaffected)
      Returns:
      the distance, or zero if point lies inside the box
    • getSupport

      Vec3 getSupport(Vec3Arg direction)
      Calculate the support vector for this convex shape.
      Parameters:
      direction - the direction vector
      Returns:
      the support vector
    • getSurfaceArea

      float getSurfaceArea()
      Get surface area of bounding box.
      Returns:
      the area
    • getVolume

      float getVolume()
      Return the volume of the box. The box is unaffected.
      Returns:
      the volume
    • isValid

      boolean isValid()
      Test whether the box is valid. It is unaffected.
      Returns:
      true if valid, otherwise false
    • overlaps

      boolean overlaps(ConstAaBox other)
      Check if this box overlaps with another box.
      Parameters:
      other - the other box to check
      Returns:
      true if they overlap, otherwise false
    • overlaps

      boolean overlaps(ConstPlane plane)
      Check if this box overlaps with a plane.
      Parameters:
      plane - the Plane object to be checked
      Returns:
      true if they overlap, otherwise false
    • scaled

      AaBox scaled(Vec3Arg factors)
      Return a scaled copy of the box. The current box is unaffected.
      Parameters:
      factors - the scale factors to apply (not null, unaffected)
      Returns:
      a new object
    • transformed

      AaBox transformed(Mat44Arg matrix)
      Return a transformed copy of the box. The current box is unaffected.
      Parameters:
      matrix - the transformation to apply (not null, unaffected)
      Returns:
      a new object