Instance Property

boundingBox

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

Declaration

@property(nonatomic, readonly) MDLAxisAlignedBoundingBox boundingBox;

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.

See Also

Working with Vertex Data

submeshes

The array of submeshes to be used in rendering the mesh.

vertexBuffers

The array of buffers that provide vertex data for the mesh.

vertexCount

The number of vertices in the mesh.

vertexDescriptor

A description of the format and layout of the mesh’s vertex buffers.

- addAttributeWithName:format:

Adds a vertex attribute to the mesh and creates a new, empty corresponding vertex buffer.

- vertexAttributeDataForAttributeNamed:

Returns the vertex data for the specified attribute.