Mesh:getBoundingBox
EditReturns 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
Name | Type | Description |
minx | number | The minimum x coordinate of the bounding box. |
maxx | number | The maximum x coordinate of the bounding box. |
miny | number | The minimum y coordinate of the bounding box. |
maxy | number | The maximum y coordinate of the bounding box. |
minz | number | The minimum z coordinate of the bounding box. |
maxz | number | The maximum z coordinate of the bounding box. |