Instance Property

boundingBox

The minimum region entirely enclosing the mesh’s vertex positions, expressed in the model coordinate system of the mesh.

Declaration

var boundingBox: MDLAxisAlignedBoundingBox { get }

Discussion

This property’s value is valid only if the mesh contains vertex data for the MDLVertexAttributePosition attribute. If the mesh does not contain position information, this property’s value is a bounding box whose maxBounds coordinate is greater than its minBounds coordinate.

Reading this property for the first time processes the mesh’s vertex data to calculate and cache a bounding box. Reading this property thereafter returns the cached value.