Interface VoxelsFactoryTypeBound<T>

Type Parameters:
T - buffer-type

public interface VoxelsFactoryTypeBound<T>
A factory for creating voxels with a particular buffer-type.

This class (and all its sub-classes) are immutable.

Author:
Owen Feehan
  • Method Details

    • create

      Voxels<T> create(SliceBufferIndex<T> voxels)
      Create a new Voxels that has been initialized with buffers from SliceBufferIndex.
      Parameters:
      voxels - the buffers to initialize with.
      Returns:
      the newly created voxels.
    • createInitialized

      Voxels<T> createInitialized(Extent extent)
      Create a new Voxels that has been initialized with memory buffers.

      The voxel values in all initialized buffers are 0.

      Parameters:
      extent - the size of voxels to create.
      Returns:
      the newly created voxels.
    • createUninitialized

      Voxels<T> createUninitialized(Extent extent)
      Create a new Voxels that has not yet been initialized with memory buffers.
      Parameters:
      extent - the size of voxels to create.
      Returns:
      the newly created voxels.
    • dataType

      VoxelDataType dataType()
      The data-type of the voxels, as created by this factory.
      Returns:
      the voxel data-type.
    • createForVoxelBuffer

      default Voxels<T> createForVoxelBuffer(VoxelBuffer<T> buffer, Extent extent)
      Create a new Voxels that has been initialized with a single-slice's memory buffers.
      Parameters:
      buffer - the voxels for a single-slice.
      extent - the size of voxels, that should be equal to the number of elements in buffer.
      Returns:
      the newly created voxels, containing a single z-slice.
    • createBounded

      default BoundedVoxels<T> createBounded(BoundingBox box)
      Creates and initializes voxels that correspond to a particular bounding-box region.
      Parameters:
      box - the bounding-box region.
      Returns:
      newly created voxels of the same extent as box and retaining an association with box.