Class IterateVoxelsNeighbors
Object
IterateVoxelsNeighbors
Utilities for iterating over the neighboring voxels to a given point.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
callEachPointInNeighborhood
(Point3i sourcePoint, Neighborhood neighborhood, boolean do3D, ProcessVoxelNeighbor<T> process, int sourceValue, int sourceOffsetXY) Iterate over each point in the neighborhood of an existing point.
-
Method Details
-
callEachPointInNeighborhood
public static <T> T callEachPointInNeighborhood(Point3i sourcePoint, Neighborhood neighborhood, boolean do3D, ProcessVoxelNeighbor<T> process, int sourceValue, int sourceOffsetXY) Iterate over each point in the neighborhood of an existing point.It also sets the source in
process
.- Parameters:
sourcePoint
- the point to iterate over its neighborhood.neighborhood
- a definition of what constitutes the neighborhood.do3D
- whether to iterate in 2D or 3D.process
- is called for each voxel in the neighborhood of the source-point.sourceValue
- the value in the source buffer atsourcePoint
.sourceOffsetXY
- the offset of the source buffer corresponding tosourcePoint
.- Returns:
- the result after processing each point in the neighborhood.
-