Object
WalkRunnable

public class WalkRunnable extends Object
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 KernelApplicationParameters parameters must indicate off.
  • An additional predicate around the point.
Author:
Owen Feehan
  • Constructor Details

    • WalkRunnable

      public WalkRunnable(KernelPointCursor point, Predicate<Point3i> additionalPredicate, Runnable executeWhenSatisfied)
      Creates a new WalkRunnable instance.
      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

      public void walk(UnsignedByteBuffer buffer, BufferRetriever bufferRetriever)
      Walks in X and Y direction, and Z direction if enabled.
      Parameters:
      buffer - the buffer associated with the current slice
      bufferRetriever - a means of retrieving buffers for other slices, accepting a relative shift compared to current slice (e.g. -1, +1) etc.