Interface BlockIterator.BlockIteratorProcedure

All Known Implementing Classes:
HorizontalLinePositionSearch, RayBlockHitTest
Enclosing class:
BlockIterator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface BlockIterator.BlockIteratorProcedure
This functional interface accepts the currently iterating block and also the entry / exit point of the ray. "t" is the value to multiply the direction with to get the exit point. The method returns false if you want to abort iteration early.
Since:
15.06.2016
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(int x, int y, int z, double px, double py, double pz, double qx, double qy, double qz)
    Called by the iteration process to deliver the next block on the ray.
  • Method Details

    • accept

      boolean accept(int x, int y, int z, double px, double py, double pz, double qx, double qy, double qz)
      Called by the iteration process to deliver the next block on the ray. Returns FALSE if you with to end iteration before the iteration reaches maximum distance.
      Parameters:
      x - X-coordinate of the block
      y - Y-coordinate of the block
      z - Z-coordinate of the block
      px - Relative X-coordinate of entry-point (0 - 1)
      py - Relative Y-coordinate of entry-point (0 - 1)
      pz - Relative Z-coordinate of entry-point (0 - 1)
      qx - Relative X-coordinate of exit-point (0 - 1)
      qy - Relative Y-coordinate of exit-point (0 - 1)
      qz - Relative Z-coordinate of exit-point (0 - 1)
      Returns:
      TRUE if iteration should continue