A Box represents a volume axis-aligned to a given space : it is defined with only two Number3, a minimum and a maximum, which represent the extents of the box along the axes of that space.

For example, a Shape.BoundingBox is axis-aligned to the model space of that shape, pertaining to its blocks.
However, an Object.CollisionBox is axis-aligned to the world space of the scene, like most physics-related boxes.

When using or creating an axis-aligned Box, be mindful of what space it is relevant to.


Box ( )

Creates a default Box with no volume.

-- creates a box with both min & max = {0,0,0}
local box = Box()

box = Box({0,0,0}, {10,10,10})


Box Copy ( Box b )

Returns a copy of the Box.


Number3 Center read-only

Box geometric center point.

Box maximum point representing the upper extent along the axes.

Box minimum point representing the lower extent along the axes.