init(data:boundingBox:voxelExtent:)
Initializes a voxel array with the specified voxel data.
Declaration
init(data voxelData: Data, boundingBox: MDLAxisAlignedBoundingBox, voxelExtent: Float)Parameters
- voxelData:
A data object containing an array of Mdlvoxelindex values, each of which describes the locations of voxels within the specified volume as well as their volumetric relationship to the object modeled by the voxel array.
- boundingBox:
The extent of the voxel array’s volume in world coordinate space.
- voxelExtent:
The size of a single voxel in world coordinate space.
Return Value
A new voxel array.
Discussion
The boundingBox parameter relates the integer grid of the newly created voxel array to a continuous Cartesian space. The methods listed in Relating Voxels to Scene Space and Creating a Mesh from Voxels operate with respect to this bounding volume.