Mesh:getBoundingBox

Edit

Returns the axis-aligned bounding box of the Mesh, or nil if the Mesh doesn't have a bounding box.

Meshes with the cpu storage mode can compute their bounding box automatically using Mesh:computeBoundingBox. The bounding box can also be set manually using Mesh:setBoundingBox.

Passes will use the bounding box of a Mesh to cull it against the cameras when Pass:setViewCull is enabled, which avoids rendering it when it's out of view.

minx, maxx, miny, maxy, minz, maxz = Mesh:getBoundingBox()

Arguments

None

Returns

NameTypeDescription
minxnumber The minimum x coordinate of the bounding box.
maxxnumber The maximum x coordinate of the bounding box.
minynumber The minimum y coordinate of the bounding box.
maxynumber The maximum y coordinate of the bounding box.
minznumber The minimum z coordinate of the bounding box.
maxznumber The maximum z coordinate of the bounding box.

See also