Class IterateVoxelsIntersectingBounded
Object
IterateVoxelsIntersectingBounded
Like
IterateVoxelsBoundingBox
but specifically for processing areas of intersection
between BoundedVoxels
of type UnsignedByteBuffer
.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
withTwoBuffers
(BoundedVoxels<T> voxels1, BoundedVoxels<T> voxels2, ProcessBufferBinary<T, T> process) Iterates over the intersection of two bounded-voxels of typeBoundedVoxels
.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 typeBoundedVoxels
but only voxels that lie on an object-mask.withTwoBuffersUntil
(BoundedVoxels<T> voxels1, BoundedVoxels<T> voxels2, PredicateBufferBinary<T> predicate) Iterates over the intersection of two bounded-voxels of typeBoundedVoxels
until a predicate is satisfied.
-
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 typeBoundedVoxels
.- 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 forfirst
andsecond
.
-
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 typeBoundedVoxels
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 ofvoxels1
andvoxels2
.onMaskGlobal
- the on value inmaskGlobal
.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 forfirst
andsecond
.
-
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 typeBoundedVoxels
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.
-