Class IterateVoxelsIntersectingBounded

Object
IterateVoxelsIntersectingBounded

public class IterateVoxelsIntersectingBounded extends Object
Like IterateVoxelsBoundingBox but specifically for processing areas of intersection between BoundedVoxels of type UnsignedByteBuffer.
Author:
Owen Feehan
  • Method Details

    • withTwoBuffers

      public static <T> void withTwoBuffers(BoundedVoxels<T> voxels1, BoundedVoxels<T> voxels2, ProcessBufferBinary<T,T> process)
      Iterates over the intersection of two bounded-voxels of type BoundedVoxels.
      Type Parameters:
      T - voxel buffer data type.
      Parameters:
      voxels1 - the first bounded-voxels.
      voxels2 - the second bounded-voxels.
      process - called for every voxel in the intersection containing the respective buffers and offsets for first and second.
    • withTwoBuffers

      public static void withTwoBuffers(Voxels<UnsignedByteBuffer> maskGlobal, byte onMaskGlobal, BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, ProcessBufferBinary<UnsignedByteBuffer,UnsignedByteBuffer> process)
      Iterates over the intersection of two bounded-voxels of type BoundedVoxels but only voxels that lie on an object-mask.
      Parameters:
      maskGlobal - a mask defined on the entire global space, and all matching voxels must have an on value in this mask, in addition to being part of the intersection of voxels1 and voxels2.
      onMaskGlobal - the on value in maskGlobal.
      voxels1 - the first bounded-voxels.
      voxels2 - the second bounded-voxels.
      process - called for every matching voxel in the intersection containing the respective buffers and offsets for first and second.
    • withTwoBuffersUntil

      public static <T> Optional<Point3i> withTwoBuffersUntil(BoundedVoxels<T> voxels1, BoundedVoxels<T> voxels2, PredicateBufferBinary<T> predicate)
      Iterates over the intersection of two bounded-voxels of type BoundedVoxels until a predicate is satisfied.
      Type Parameters:
      T - voxel buffer data type.
      Parameters:
      voxels1 - the first bounded-voxels.
      voxels2 - the second bounded-voxels.
      predicate - iteration occurs until this predicate is satisfied, or no more voxels exist in the intersection.
      Returns:
      Point3i if intersection exists, then the first point of intersection found (newly-created), or else empty if no intersection exists.