Contents

voxelExists(atIndex:allowAnyX:allowAnyY:allowAnyZ:allowAnyShell:)

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

Declaration

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

Parameters

  • index:

    An index describing both the location of the voxel within the three-dimensional grid of the voxel array and its relationship to the volume of the object modeled by the voxel array.

  • allowAnyX:

    If True, this method treats the x component of the index parameter as a wildcard. If False, this method requires an exact match for the x component.

  • allowAnyY:

    If True, this method treats the y component of the index parameter as a wildcard. If False, this method requires an exact match for the y component.

  • allowAnyZ:

    If True, this method treats the z component of the index parameter as a wildcard. If False, this method requires an exact match for the z component.

  • allowAnyShell:

    If True, this method treats the w (shell level) component of the index parameter as a wildcard. If False, this method requires an exact match for the shell level component.

Return Value

true if the voxel array contains at least one voxel index matching the specified parameters; otherwise false.

Discussion

Use the allowAnyX, allowAnyY, allowAnyZ, and allowAnyShell parameters to perform wildcard searches. For example:

See Also

Examining Voxels