Instance Method

voxels(within:)

Returns a data object containing all voxels within the specified volume.

Declaration

func voxels(within extent: MDLVoxelIndexExtent) -> Data?

Parameters

extent

The minimum and maximum corners of the volume for which to retrieve voxel data.

Return Value

A data object containing MDLVoxelIndex values.

Discussion

The returned NSData object contains an array of MDLVoxelIndex values describing the locations of voxels within the specified volume as well as their volumetric relationship to the object modeled by the voxel array.

See Also

Examining Voxels

var count: Int

The number of voxels in the array.

var voxelIndexExtent: MDLVoxelIndexExtent

The indexes that define the corners of the three-dimensional voxel grid.

func voxelExists(atIndex: MDLVoxelIndex, allowAnyX: Bool, allowAnyY: Bool, allowAnyZ: Bool, allowAnyShell: Bool) -> Bool

Returns a Boolean value indicating whether the voxel array contains voxel data for the specified index.

func voxelIndices() -> Data?

Returns a data object containing all voxels within the 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