Class CountVoxelsIntersectingBounded
Object
CountVoxelsIntersectingBounded
Like
IterateVoxelsBoundingBox
but counts voxels matching a predicate rather than
iterating.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
countByte
(BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate) Counts all voxels in the intersection of two bounded-voxels of typeBoundedVoxels
that match a predicate.static int
countByteMasked
(Voxels<UnsignedByteBuffer> maskGlobal, byte onMaskGlobal, BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate) Counts all voxels intersection of two bounded-voxels of typeBoundedVoxels
but only voxels that lie on an object-mask and match a predicate.
-
Method Details
-
countByte
public static int countByte(BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate) Counts all voxels in the intersection of two bounded-voxels of typeBoundedVoxels
that match a predicate.- Parameters:
voxels1
- the first bounded-voxelsvoxels2
- the second bounded-voxelspredicate
- determines if a particular voxel should be counted or not?- Returns:
- the number of voxels that match the predicate.
-
countByteMasked
public static int countByteMasked(Voxels<UnsignedByteBuffer> maskGlobal, byte onMaskGlobal, BoundedVoxels<UnsignedByteBuffer> voxels1, BoundedVoxels<UnsignedByteBuffer> voxels2, PredicateTwoBytes predicate) Counts all voxels intersection of two bounded-voxels of typeBoundedVoxels
but only voxels that lie on an object-mask and match a predicate.- 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-voxelsvoxels2
- the second bounded-voxelspredicate
- determines if a particular voxel should be counted or not?- Returns:
- the number of voxels that match the predicate.
-