Gets the maximum BVH vertex in the tree.
The maximum BVHVertex stored in this BVHTree.
Gets the minimum bounding vertex of the BVH tree.
The BVHVertex representing the minimum bounds.
Adds a vertex to the BVH tree if it is not already present. Updates the minimum and maximum bounds of the tree to include the new vertex. Marks the tree as initialized after adding the vertex.
The BVHVertex
to add to the tree.
An ActionResult
object indicating whether the vertex was added successfully.
If the vertex is already present, returns result: false
with a message.
Calculates and returns the centroid of the bounding volume defined by _min
and _max
.
The centroid is computed as the midpoint between the minimum and maximum coordinates.
The centroid as a BVHVertex
instance, or undefined
if the tree is not initialized.
Calculates and returns the diagonal vector of the bounding box defined by _min
and _max
.
The diagonal is computed as the difference between the maximum and minimum coordinates
along each axis (x, y, z).
A new BVHVertex
representing the diagonal vector,
or undefined
if the bounding box is not initialized.
Static
createCreates and returns a new instance of BVHBoundingBox
.
A newly created BVHBoundingBox
object.
Indicates whether the BVH tree is empty. Returns
true
if the tree has not been initialized.