Class IterateVoxelsRemaining

Object
IterateVoxelsRemaining

public class IterateVoxelsRemaining extends Object
Utilities for iterating over remaining voxels in one or more VoxelBuffers.

A processor is called on each remaining voxel.

Author:
Owen Feehan
  • Method Details

    • withTwoBuffersWithoutOffset

      public static <S, T> void withTwoBuffersWithoutOffset(VoxelBuffer<S> voxelBuffer1, VoxelBuffer<T> voxelBuffer2, ProcessBufferBinaryWithoutOffset<S,T> process)
      Iterate over remaining voxels each voxel - with two associated buffers for each slice.

      Precondition: that both buffer's current position are jointly set to a position, with an identical number of remaining voxels, otherwise an exception is thrown e.g. two identically sized buffers with offset=0.

      Type Parameters:
      S - buffer-type for voxels1
      T - buffer-type for voxels2
      Parameters:
      voxelBuffer1 - first voxel-buffer
      voxelBuffer2 - second voxel-buffer
      process - is called for each voxel in the buffer