Instance Method

union(with:)

Extends the voxel array to also cover the volume of the specified voxel array.

Declaration

func union(with voxels: MDLVoxelArray)

Parameters

voxels

The voxel array to combine with this voxel array.

Discussion

After a union operation, the voxel array contains voxels that were present either in the original array or in the specified array. That is, a union operation creates a voxel array that combines two volumes.

Performing a union, intersection, or difference operation clears out shell level information from all voxels in the array. (That is, the w component of every MDLVoxelIndex value in the voxel array is reset to 0.)

See Also

Performing Constructive Solid Geometry Operations

func intersect(with: MDLVoxelArray)

Reduces the voxel array to cover only the volume within both it and another voxel array.

func difference(with: MDLVoxelArray)

Reduces the voxel array to cover only the portion of its volume not covered by another voxel array.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software