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

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

    Modifier and Type
    Method
    Description
    boolean
    contains(float x, float y, float z)
    Test whether the box contains the specified point.
    boolean
    Test whether the current box contains the argument box.
    boolean
    Test whether the box contains the specified point.
    Locate the center of the box.
    getClosestPoint(float x, float y, float z)
    Locate the closest point on or in the box for the specified location.
    void
    getClosestPoint(float x, float y, float z, Vec3 storeResult)
    Locate the closest point on or in the box for the specified location.
    Locate the closest point on or in the box for the specified location.
    Copy the (half) extent of the box.
    void
    getExtent(Vec3 storeResult)
    Copy the (half) extent of the box.
    Copy the maximum contained coordinate on each axis.
    void
    getMax(Vec3 storeResult)
    Copy the maximum contained coordinate on each axis.
    Copy the minimum contained coordinate on each axis.
    void
    getMin(Vec3 storeResult)
    Copy the minimum contained coordinate on each axis.
    Copy the size (full extent) on each axis.
    void
    getSize(Vec3 storeResult)
    Copy the size (full extent) on each axis.
    float
    getSqDistanceTo(float x, float y, float z)
    Get the squared distance between the box and the specified point.
    float
    Get the squared distance between the box and the specified point.
    getSupport(float x, float y, float z)
    Calculate the support vector for this convex shape.
    void
    getSupport(float x, float y, float z, Vec3 storeResult)
    Calculate the support vector for this convex shape.
    getSupport(Vec3Arg direction)
    Calculate the support vector for this convex shape.
    void
    getSupport(Vec3Arg direction, Vec3 storeResult)
    Calculate the support vector for this convex shape.
    float
    Get surface area of bounding box.
    float
    Return the volume of the box.
    boolean
    Test whether the current box is equivalent to the argument.
    boolean
    Test whether the box is valid.
    boolean
    overlaps(float constant, float normalX, float normalY, float normalZ)
    Check if this box overlaps with a plane.
    boolean
    Check if this box overlaps with another box.
    boolean
    Check if this box overlaps with a plane.
    scaled(float x, float y, float z)
    Return a scaled copy of the box.
    scaled(Vec3Arg factors)
    Return a scaled copy of the box.
    Return a transformed copy of the box.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject

    close, hasAssignedNativeObject, ownsNativeObject, targetVa, targetVaOrZero
  • Method Details

    • contains

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

      boolean contains(float x, float y, float z)
      Test whether the box contains the specified point. The box is unaffected.
      Parameters:
      x - the X coordinate of the point to test
      y - the Y coordinate of the point to test
      z - the Z coordinate of the point to test
      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(float x, float y, float z)
      Locate the closest point on or in the box for the specified location. The box is unaffected.
      Parameters:
      x - the X coordinate of the location
      y - the Y coordinate of the location
      z - the Z coordinate of the location
      Returns:
      a new vector
    • getClosestPoint

      void getClosestPoint(float x, float y, float z, Vec3 storeResult)
      Locate the closest point on or in the box for the specified location. The box is unaffected.
      Parameters:
      x - the X coordinate of the location
      y - the Y coordinate of the location
      z - the Z coordinate of the location
      storeResult - storage for the closest point (not null, modified)
    • 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
    • getExtent

      void getExtent(Vec3 storeResult)
      Copy the (half) extent of the box. The box is unaffected.
      Parameters:
      storeResult - storage for the extent (not null, modified)
    • getMax

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

      void getMax(Vec3 storeResult)
      Copy the maximum contained coordinate on each axis. The box is unaffected.
      Parameters:
      storeResult - storage for the maximum (not null, modified)
    • getMin

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

      void getMin(Vec3 storeResult)
      Copy the minimum contained coordinate on each axis. The box is unaffected.
      Parameters:
      storeResult - storage for the minimum (not null, modified)
    • getSize

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

      void getSize(Vec3 storeResult)
      Copy the size (full extent) on each axis. The box is unaffected.
      Parameters:
      storeResult - storage for the size (not null, modified)
    • getSqDistanceTo

      float getSqDistanceTo(float x, float y, float z)
      Get the squared distance between the box and the specified point.
      Parameters:
      x - the X coordinate of the point to measure from
      y - the Y coordinate of the point to measure from
      z - the Z coordinate of the point to measure from
      Returns:
      the distance, or zero if the point lies inside the box
    • 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(float x, float y, float z)
      Calculate the support vector for this convex shape.
      Parameters:
      x - the X component of the direction vector
      y - the Y component of the direction vector
      z - the Z component of the direction vector
      Returns:
      the support vector
    • getSupport

      void getSupport(float x, float y, float z, Vec3 storeResult)
      Calculate the support vector for this convex shape. The shape is unaffected.
      Parameters:
      x - the X component of the direction vector
      y - the Y component of the direction vector
      z - the Z component of the direction vector
      storeResult - storage for the support vector (not null, modified)
    • getSupport

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

      void getSupport(Vec3Arg direction, Vec3 storeResult)
      Calculate the support vector for this convex shape. The shape is unaffected.
      Parameters:
      direction - the direction vector (not null, unaffected)
      storeResult - storage for the support vector (not null, modified)
    • 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
    • isEqual

      boolean isEqual(ConstAaBox other)
      Test whether the current box is equivalent to the argument. Both boxes are unaffected.
      Parameters:
      other - the box to compare with (not null, unaffected)
      Returns:
      true if equal, false if unequal
    • 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 (not null, unaffected)
      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 (not null, unaffected)
      Returns:
      true if they overlap, otherwise false
    • overlaps

      boolean overlaps(float constant, float normalX, float normalY, float normalZ)
      Check if this box overlaps with a plane. The box is unaffected.
      Parameters:
      constant - the plane constant
      normalX - the X component of the plane's normal
      normalY - the Y component of the plane's normal
      normalZ - the Z component of the plane's normal
      Returns:
      true if they overlap, otherwise false
    • scaled

      AaBox scaled(float x, float y, float z)
      Return a scaled copy of the box. The current box is unaffected.
      Parameters:
      x - the scale factor to apply to the local X axis
      y - the scale factor to apply to the local Y axis
      z - the scale factor to apply to the local Z axis
      Returns:
      a new object
    • 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