Class PositionIterator

java.lang.Object
nl.pim16aap2.animatedarchitecture.core.util.PositionIterator
All Implemented Interfaces:
Iterable<Vector3Di>

@Deprecated(forRemoval=true) public class PositionIterator extends Object implements Iterable<Vector3Di>
Deprecated, for removal: This API element is subject to removal in a future version.
This class does not have any tests and is likely to be removed in the future!
Iterator that iterates over all values between 2 Vector3Dis.
  • Constructor Details

    • PositionIterator

      public PositionIterator(Vector3Di posA, Vector3Di posB, PositionIterator.IterationMode iterationMode, int volume)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct a new PositionIterator. When iterating between two values, the starting values are the first result and the ending values are the last result. If the starting and ending values are the same, there will be a single result.
      Parameters:
      posA - The starting values.
      posB - The ending values.
      iterationMode - The mode of iteration.
      volume - The total number of blocks between posA and posB (inclusive). Do not use this if you do not know this.
    • PositionIterator

      public PositionIterator(Vector3Di posA, Vector3Di posB, PositionIterator.IterationMode iterationMode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct a new PositionIterator. When iterating between two values, the starting values are the first result and the ending values are the last result. If the starting and ending values are the same, there will be a single result.
      Parameters:
      posA - The starting values.
      posB - The ending values.
      iterationMode - The mode of iteration.
    • PositionIterator

      public PositionIterator(Cuboid cuboid, PositionIterator.IterationMode iterationMode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct a new PositionIterator. When iterating between two values, the starting values are the first result and the ending values are the last result. If the starting and ending values are the same, there will be a single result.
      Parameters:
      cuboid - The Cuboid to iterate over, from Cuboid.getMin() to Cuboid.getMax().
      iterationMode - The mode of iteration.
  • Method Details

    • iterator

      public nl.pim16aap2.animatedarchitecture.core.util.PositionIterator.CustomIterator iterator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      iterator in interface Iterable<Vector3Di>
    • forEach

      public void forEach(TriIntConsumer action)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Works similar to Iterable.forEach(Consumer), but with the exception that each step will be applied without constructing a new Vector3Di.
      Parameters:
      action - The method to apply for each step.