Box3
An axis-aligned bounding box (AABB) in 3D space.
The box is mutable and not thread-safe. Use each instance from one thread only. Most methods change this and return it for chaining.
The constructor stores the given vectors by reference (it does not copy them). Passing the same vector as both bounds, or sharing a vector with another object, means later mutations are visible through every alias. Use set or clone when you need independent storage.
There is no setFromObject or expandByObject, because Kite3D has no scene objects. Pass the object's world-space vertices to setFromPoints or setFromBufferAttribute instead.
Constructors
Properties
Functions
Transforms this box by the 4x4 matrix matrix. The transform of an empty box is an empty box.
Returns true if this box fully contains box (an identical box counts as contained).
Returns true if point lies within or on the boundary of this box.
Returns the Euclidean distance from point to the nearest edge of this box (0 if inside). An empty box yields +Infinity.
Expands this box to include point.
Expands this box equilaterally by vector (x on both horizontal sides, y on both vertical sides, z on both depth sides).
Sets this box's bounds from json laid out as [minX, minY, minZ, maxX, maxY, maxZ].
Writes a bounding sphere that encloses this box into target (an empty sphere if this box is empty).
Returns true if box intersects this box (touching edges count).
Returns true if plane intersects this box.
Returns true if sphere intersects this box.
Returns true if triangle intersects this box.
Sets this box to enclose the first count positions in attribute. AttributeLike has no size, so you pass count yourself.
Sets this box to enclose all the given points. An empty sequence makes the box empty.
Returns this box as [minX, minY, minZ, maxX, maxY, maxZ]. three.js returns an object with min and max arrays instead.