Return Value

A new mesh object.

Discussion

This method generates vertex data for a box centered at the origin of its local coordinate system.

The inwardNormals parameter determines the direction of generated vertex normal vectors for the mesh. Specify true if the mesh will be viewed from inside (for example, for use in a sky effect), or false if the mesh will be viewed from outside.

The allocator parameter controls vertex data allocation for the mesh. For example, to use the MetalKit framework for loading vertex data into GPU buffers for rendering using Metal, pass a MTKMeshBufferAllocator object. By specifying an allocator, you can ensure that mesh data is copied a minimal number of times between being read from a file and being loaded into GPU memory for rendering.