Readonly
centerCenter of box.
Readonly
halfHalf the distance across the box in each axis.
Combines two bounding boxes into one, enclosing both.
Bounding box to add.
Compute the size of the AABB to encapsulate all specified vertices.
The vertices used to compute the new size for the AABB.
Optional
numVerts: numberNumber of vertices to use from the beginning of vertices array. All vertices are used if not specified.
Test if a point is inside a AABB.
Point to test.
True if the point is inside the AABB and false otherwise.
Test whether two axis-aligned bounding boxes intersect.
Bounding box to test against.
True if there is an intersection.
Test if a Bounding Sphere is overlapping, enveloping, or inside this AABB.
Bounding Sphere to test.
True if the Bounding Sphere is overlapping, enveloping, or inside the AABB and false otherwise.
Test if a ray intersects with the AABB.
Ray to test against (direction must be normalized).
Optional
point: Vec3If there is an intersection, the intersection point will be copied into here.
True if there is an intersection.
Set an AABB to enclose the specified AABB if it were to be transformed by the specified 4x4 matrix.
Box to transform and enclose.
Transformation matrix to apply to source AABB.
If true is specified, a scale from the matrix is ignored. Defaults to false.
Static
computeCompute the min and max bounding values to encapsulate all specified vertices.
The vertices used to compute the new size for the AABB.
Stored computed min value.
Stored computed max value.
Optional
numVerts: number = ...Number of vertices to use from the beginning of vertices array. All vertices are used if not specified.
Axis-Aligned Bounding Box.