java.lang.Object
com.hypixel.hytale.procedurallib.logic.cell.evaluator.BranchEvaluator
All Implemented Interfaces:
PointEvaluator

public class BranchEvaluator extends Object implements PointEvaluator
  • Field Details

    • CARDINAL_MASK

      protected static final int CARDINAL_MASK
      See Also:
    • CARDINAL_MASK_RESULT_X

      protected static final int CARDINAL_MASK_RESULT_X
      See Also:
    • CARDINAL_MASK_RESULT_Y

      protected static final int CARDINAL_MASK_RESULT_Y
      See Also:
    • RANDOM_DIRECTION_MASK

      protected static final int RANDOM_DIRECTION_MASK
      See Also:
    • RANDOM_DIRECTIONS

      protected static final Vector2i[] RANDOM_DIRECTIONS
    • pointFunction

      @Nonnull protected final CellPointFunction pointFunction
    • direction

      protected final BranchEvaluator.Direction direction
    • jitter

      protected final CellJitter jitter
    • branch2parentScale

      protected final double branch2parentScale
    • invLineNormalization

      protected final double invLineNormalization
  • Constructor Details

  • Method Details

    • getJitter

      public CellJitter getJitter()
      Specified by:
      getJitter in interface PointEvaluator
    • evalPoint

      public void evalPoint(int seed, double x, double y, int hashA, int cax, int cay, double ax, double ay, @Nonnull ResultBuffer.ResultBuffer2d buffer)
      Specified by:
      evalPoint in interface PointEvaluator
    • evalPoint2

      public void evalPoint2(int seed, double x, double y, int cellHash, int xi, int yi, double vecX, double vecY, ResultBuffer.ResultBuffer2d buffer)
      Specified by:
      evalPoint2 in interface PointEvaluator
    • evalPoint

      public void evalPoint(int seed, double x, double y, double z, int cellHash, int cellX, int cellY, int cellZ, double cellPointX, double cellPointY, double cellPointZ, ResultBuffer.ResultBuffer3d buffer)
      Specified by:
      evalPoint in interface PointEvaluator
    • evalPoint2

      public void evalPoint2(int seed, double x, double y, double z, int cellHash, int cellX, int cellY, int cellZ, double cellPointX, double cellPointY, double cellPointZ, ResultBuffer.ResultBuffer3d buffer)
      Specified by:
      evalPoint2 in interface PointEvaluator
    • getConnectionX

      protected static int getConnectionX(BranchEvaluator.Direction direction, int regionHash, double regionCoord, int cellHash, double cellCoord)
    • getConnectionY

      protected static int getConnectionY(BranchEvaluator.Direction direction, int regionHash, double regionCoord, int cellHash, double cellCoord)
    • checkBounds

      protected static boolean checkBounds(double x, double y, double ax, double ay, double bx, double by, double thickness)