Bounding box type (axis-aligned)

Constructor

inlinenew()

New empty bounding box

Variables

max:Vec3

the "bottom-right-far" corner of the bounding box

min:Vec3

the "top-left-near" corner of the bounding box

Methods

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

Parameters:

bb

the other bounding box

inlinesurfaceArea():Float

Compute the surface area of the box

Returns:

the surface area