Instance Method

voxelBoundingBoxAtIndex:

Returns the extent of the specified voxel’s volume in the world coordinate space of the asset from which the voxel array was created.

Declaration

- (MDLAxisAlignedBoundingBox)voxelBoundingBoxAtIndex:(MDLVoxelIndex)index;

Parameters

index

An index describing the location of a voxel within the three-dimensional grid of the voxel array. (The w component is ignored for this query.)

Return Value

The bounding box for the single voxel at the specified index, in the world coordinate space of the asset from which the voxel array was created.

Discussion

The coordinate space for spatial locations of voxels is the world space of the asset from which the voxel array was created, or for voxel arrays created with the initWithData:boundingBox:voxelExtent: initializer, the bounding box specified at initialization.

See Also

Relating Voxels to Scene Space

boundingBox

The extent of the voxel array’s volume in world coordinate space.

- indexOfSpatialLocation:

Returns voxel information corresponding to the specified point in the world coordinate space of the asset from which the voxel array was created.

- spatialLocationOfIndex:

Returns the location of the specified voxel in world coordinate space.