Class VoxelBufferFactory

Object
VoxelBufferFactory

public class VoxelBufferFactory extends Object
Creating voxel-buffers and arrays of voxel-buffers of various types.
Author:
Owen Feehan
  • Method Details

    • allocateUnsignedByte

      public static VoxelBuffer<UnsignedByteBuffer> allocateUnsignedByte(int capacity)
      Allocates a new unsigned byte voxel-buffer of given size.
      Parameters:
      capacity - the capacity (size).
      Returns:
      a new VoxelBuffer with newly allocated (non-direct) memory.
    • allocateUnsignedByteArray

      public static VoxelBuffer<UnsignedByteBuffer>[] allocateUnsignedByteArray(int size)
      Creates an array of unsigned byte voxel-buffers of given size.
      Parameters:
      size - the size of the array
      Returns:
      a newly created array (with elements set to null).
    • allocateUnsignedShort

      public static VoxelBuffer<UnsignedShortBuffer> allocateUnsignedShort(int capacity)
      Allocates a new unsigned short voxel-buffers of given size.
      Parameters:
      capacity - the capacity (size).
      Returns:
      a new VoxelBuffer with newly allocated (non-direct) memory.
    • allocateUnsignedShortArray

      public static VoxelBuffer<UnsignedShortBuffer>[] allocateUnsignedShortArray(int size)
      Creates an array of unsigned short voxel-buffers of given size.
      Parameters:
      size - the size of the array
      Returns:
      a newly created array (with elements set to null).
    • allocateUnsignedInt

      public static VoxelBufferUnsignedInt allocateUnsignedInt(int capacity)
      Allocates a new unsigned int voxel-buffers of given size.
      Parameters:
      capacity - the capacity (size).
      Returns:
      a new VoxelBuffer with newly allocated (non-direct) memory.
    • allocateUnsignedIntArray

      public static VoxelBuffer<UnsignedIntBuffer>[] allocateUnsignedIntArray(int size)
      Creates an array of unsigned int voxel-buffers of given size.
      Parameters:
      size - the size of the array
      Returns:
      a newly created array (with elements set to null).
    • allocateFloat

      public static VoxelBufferFloat allocateFloat(int capacity)
      Allocates a new float voxel-buffers of given size.
      Parameters:
      capacity - the capacity (size).
      Returns:
      a new VoxelBuffer with newly allocated (non-direct) memory.
    • allocateFloatArray

      public static VoxelBuffer<FloatBuffer>[] allocateFloatArray(int size)
      Creates an array of float voxel-buffers of given size.
      Parameters:
      size - the size of the array
      Returns:
      a newly created array (with elements set to null).