Class WalkRunnable
Object
WalkRunnable
Walks in X, Y and Z directions from a point, executing a
Runnable if the neighbor
satisfies conditions.
The conditions are:
- An associated buffer for the point must have an off value, or if its outside
the scene, the
KernelApplicationParametersparameters must indicate off. - An additional predicate around the point.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionWalkRunnable(KernelPointCursor point, Predicate<Point3i> additionalPredicate, Runnable executeWhenSatisfied) Creates a newWalkRunnableinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidwalk(UnsignedByteBuffer buffer, BufferRetriever bufferRetriever) Walks in X and Y direction, and Z direction if enabled.
-
Constructor Details
-
WalkRunnable
public WalkRunnable(KernelPointCursor point, Predicate<Point3i> additionalPredicate, Runnable executeWhenSatisfied) Creates a newWalkRunnableinstance.- Parameters:
point- The cursor used for iterating through points.additionalPredicate- An additional predicate that must also be satisfied, as the second condition (see class description).executeWhenSatisfied- Executed whenever an neighbor satisfied the conditions.
-
-
Method Details
-
walk
Walks in X and Y direction, and Z direction if enabled.- Parameters:
buffer- the buffer associated with the current slicebufferRetriever- a means of retrieving buffers for other slices, accepting a relative shift compared to current slice (e.g. -1, +1) etc.
-