Bounding box type (axis-aligned)
inlinenew()
New empty bounding box
max:Vec3
the "bottom-right-far" corner of the bounding box
min:Vec3
the "top-left-near" corner of the bounding box
inlineadd(p:Vec3):Void
Add a new point to the bounding box, making the bounding box contain the point
Parameters:
the
point
inlinecentroid():Vec3
Compute centroid of the bounding box
Returns:
the centroid
inlinemerge(bb:BBox):Void
Merge another bounding box with this one, making this bounding box contain the other
bb
the other bounding box
inlinesurfaceArea():Float
Compute the surface area of the box
the surface area