Class HexCellDistanceFunction
java.lang.Object
com.hypixel.hytale.procedurallib.logic.cell.HexCellDistanceFunction
- All Implemented Interfaces:
CellDistanceFunction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HexCellDistanceFunctionstatic final DoubleArray.Double2[]protected static final doublestatic final CellPointFunctionprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidcollect(int originalSeed, int seed, int minX, int minY, int maxX, int maxY, ResultBuffer.Bounds2d bounds, T ctx, PointConsumer<T> collector, PointEvaluator pointEvaluator) voidevalPoint(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) voidevalPoint(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, PointEvaluator pointEvaluator) voidevalPoint2(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) voidevalPoint2(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, PointEvaluator pointEvaluator) intgetCellX(double x, double y) intgetCellY(double x, double y) static intgetHash(int seed, int x, int y) doubleinvScale(double value) voidnearest2D(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, PointEvaluator pointEvaluator) voidnearest3D(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) doublescale(double value) static inttoGridX(double x, double y) static inttoGridY(double x, double y) static doubletoHexX(double hx, double hy) static doubletoHexY(double hx, double hy) toString()voidtransition2D(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, PointEvaluator pointEvaluator) voidtransition3D(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.procedurallib.logic.cell.CellDistanceFunction
getCellX, getCellY, getCellZ
-
Field Details
-
DISTANCE_FUNCTION
-
POINT_FUNCTION
-
X_TO_GRID_X
protected static final double X_TO_GRID_X -
Y_TO_GRID_X
protected static final double Y_TO_GRID_X- See Also:
-
Y_TO_GRID_Y
protected static final double Y_TO_GRID_Y- See Also:
-
X_TO_HEX_X
protected static final double X_TO_HEX_X -
Y_TO_HEX_X
protected static final double Y_TO_HEX_X -
Y_TO_HEX_Y
protected static final double Y_TO_HEX_Y- See Also:
-
NORMALIZATION
protected static final double NORMALIZATION- See Also:
-
SCALE
protected static final double SCALE -
HEX_CELL_2D
-
-
Constructor Details
-
HexCellDistanceFunction
public HexCellDistanceFunction()
-
-
Method Details
-
scale
public double scale(double value) - Specified by:
scalein interfaceCellDistanceFunction
-
invScale
public double invScale(double value) - Specified by:
invScalein interfaceCellDistanceFunction
-
getCellX
public int getCellX(double x, double y) - Specified by:
getCellXin interfaceCellDistanceFunction
-
getCellY
public int getCellY(double x, double y) - Specified by:
getCellYin interfaceCellDistanceFunction
-
nearest2D
public void nearest2D(int seed, double x, double y, int cellX, int cellY, @Nonnull ResultBuffer.ResultBuffer2d buffer, @Nonnull PointEvaluator pointEvaluator) - Specified by:
nearest2Din interfaceCellDistanceFunction
-
nearest3D
public void nearest3D(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) - Specified by:
nearest3Din interfaceCellDistanceFunction
-
transition2D
public void transition2D(int seed, double x, double y, int cellX, int cellY, @Nonnull ResultBuffer.ResultBuffer2d buffer, @Nonnull PointEvaluator pointEvaluator) - Specified by:
transition2Din interfaceCellDistanceFunction
-
transition3D
public void transition3D(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) - Specified by:
transition3Din interfaceCellDistanceFunction
-
evalPoint
public void evalPoint(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, @Nonnull PointEvaluator pointEvaluator) - Specified by:
evalPointin interfaceCellDistanceFunction
-
evalPoint
public void evalPoint(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) - Specified by:
evalPointin interfaceCellDistanceFunction
-
evalPoint2
public void evalPoint2(int seed, double x, double y, int cellX, int cellY, ResultBuffer.ResultBuffer2d buffer, @Nonnull PointEvaluator pointEvaluator) - Specified by:
evalPoint2in interfaceCellDistanceFunction
-
evalPoint2
public void evalPoint2(int seed, double x, double y, double z, int cellX, int cellY, int cellZ, ResultBuffer.ResultBuffer3d buffer, PointEvaluator pointEvaluator) - Specified by:
evalPoint2in interfaceCellDistanceFunction
-
collect
public <T> void collect(int originalSeed, int seed, int minX, int minY, int maxX, int maxY, @Nonnull ResultBuffer.Bounds2d bounds, T ctx, @Nonnull PointConsumer<T> collector, @Nonnull PointEvaluator pointEvaluator) - Specified by:
collectin interfaceCellDistanceFunction
-
toString
-
getHash
public static int getHash(int seed, int x, int y) -
toGridX
public static int toGridX(double x, double y) -
toGridY
public static int toGridY(double x, double y) -
toHexX
public static double toHexX(double hx, double hy) -
toHexY
public static double toHexY(double hx, double hy)
-