Class PositionIterator

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

@Deprecated public class PositionIterator extends Object implements Iterable<Vector3Di>
Deprecated.
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.
      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.
      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.
      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.
      Specified by:
      iterator in interface Iterable<Vector3Di>
    • forEach

      public void forEach(TriIntConsumer action)
      Deprecated.
      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.