Class VoxelBufferUnsigned<T extends UnsignedBuffer>

Object
VoxelBuffer<T>
VoxelBufferUnsigned<T>
Type Parameters:
T - buffer-type for voxels

public abstract class VoxelBufferUnsigned<T extends UnsignedBuffer> extends VoxelBuffer<T>
A parent class for VoxelBuffer that accepts unsigned-buffers and implements some common operations.
Author:
Owen Feehan
  • Constructor Details

    • VoxelBufferUnsigned

      public VoxelBufferUnsigned(T buffer)
      Creates a new VoxelBufferUnsigned instance.
      Parameters:
      buffer - Buffer the buffer to use internally.
  • Method Details

    • buffer

      public T buffer()
      Description copied from class: VoxelBuffer
      The associated buffer for storing the voxels.

      This buffer is either a NIO or other classes that wraps the underlying array storing voxel intensities.

      Specified by:
      buffer in class VoxelBuffer<T extends UnsignedBuffer>
      Returns:
      the buffer.
    • capacity

      public int capacity()
      Description copied from class: VoxelBuffer
      The capacity (i.e. size) of the buffer.

      This is meant in the sense of Java's NIO Buffer classes.

      Specified by:
      capacity in class VoxelBuffer<T extends UnsignedBuffer>
      Returns:
      the size.
    • hasRemaining

      public boolean hasRemaining()
      Description copied from class: VoxelBuffer
      Are there voxels remaining in a buffer?

      This is meant in the sense of Java's NIO Buffer classes.

      Specified by:
      hasRemaining in class VoxelBuffer<T extends UnsignedBuffer>
      Returns:
      true if there are voxels remaining in the buffer, false otherwise.
    • position

      public void position(int newPosition)
      Description copied from class: VoxelBuffer
      Assigns a new position to the buffer.

      This is meant in the sense of Java's NIO Buffer classes.

      Specified by:
      position in class VoxelBuffer<T extends UnsignedBuffer>
      Parameters:
      newPosition - the offset to assign as position.
    • isDirect

      public boolean isDirect()
      Description copied from class: VoxelBuffer
      Is this buffer direct or non-direct?

      This is meant in the sense of Java's NIO Buffer classes.

      Specified by:
      isDirect in class VoxelBuffer<T extends UnsignedBuffer>
      Returns:
      true iff the buffer is direct.