MDLVoxelArray
A model of a 3D object’s solid volume as a collection of voxels, or cubic units.
Declaration
class MDLVoxelArrayOverview
Unlike a mesh, which models only surface topology, a voxel array models the solid volume of a 3D object. Voxels are useful for modeling volumetric phenomena (such as clouds and fire), performing solid geometry operations (such as intersection and union), and preparing a 3D design for real-world physical production.
Topics
Creating a Voxel Array
init(asset:divisions:interiorShells:exteriorShells:patchRadius:)init(asset:divisions:interiorNBWidth:exteriorNBWidth:patchRadius:)init(data:boundingBox:voxelExtent:)
Examining Voxels
countvoxelIndexExtentvoxelExists(atIndex:allowAnyX:allowAnyY:allowAnyZ:allowAnyShell:)voxels(within:)voxelIndices()
Modifying Voxels
setVoxelAtIndex(_:)setVoxelsFor(_:divisions:interiorNBWidth:exteriorNBWidth:patchRadius:)setVoxelsFor(_:divisions:interiorShells:exteriorShells:patchRadius:)