Interface ConstAaBox
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
AaBox
Read-only access to an
AaBox. (native type: const AABox)-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(ConstAaBox other) Test whether the current box contains the argument box.booleanTest whether the box contains the specified point.Locate the center of the box.getClosestPoint(Vec3Arg location) Locate the closest point on or in the box for the specified location.Copy the (half) extent of the box.getMax()Copy the maximum contained coordinate on each axis.getMin()Copy the minimum contained coordinate on each axis.getSize()Copy the size (full extent) on each axis.floatgetSqDistanceTo(Vec3Arg point) Get the squared distance between the box and the specified point.getSupport(Vec3Arg direction) Calculate the support vector for this convex shape.floatGet surface area of bounding box.floatReturn the volume of the box.booleanisValid()Test whether the box is valid.booleanoverlaps(ConstAaBox other) Check if this box overlaps with another box.booleanoverlaps(ConstPlane plane) Check if this box overlaps with a plane.Return a scaled copy of the box.transformed(Mat44Arg matrix) Return a transformed copy of the box.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
contains
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:
trueif contained, otherwisefalse
-
contains
Test whether the box contains the specified point. The box is unaffected.- Parameters:
point- the point to test (not null, unaffected)- Returns:
trueif contained, otherwisefalse
-
getCenter
Vec3 getCenter()Locate the center of the box. The box is unaffected.- Returns:
- a new location vector
-
getClosestPoint
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
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
pointlies inside the box
-
getSupport
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:
trueif valid, otherwisefalse
-
overlaps
Check if this box overlaps with another box.- Parameters:
other- the other box to check- Returns:
trueif they overlap, otherwisefalse
-
overlaps
Check if this box overlaps with a plane.- Parameters:
plane- thePlaneobject to be checked- Returns:
trueif they overlap, otherwisefalse
-
scaled
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
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
-