Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- evalPoint(int, double, double, int, int, int, double, double, ResultBuffer.ResultBuffer2d)
- evalPoint2(int, double, double, int, int, int, double, double, ResultBuffer.ResultBuffer2d)
- evalPoint(int, double, double, double, int, int, int, int, double, double, double, ResultBuffer.ResultBuffer3d)
- evalPoint2(int, double, double, double, int, int, int, int, double, double, double, ResultBuffer.ResultBuffer3d)
- toString()
- getDistanceModifier(IDoubleRange)
- randomDistanceModification(int)
Class DistancePointEvaluator
java.lang.Object
com.hypixel.hytale.procedurallib.logic.cell.evaluator.DistancePointEvaluator
- All Implemented Interfaces:
PointEvaluator
A PointEvaluator that modifies the distance value before recording the result.
-
Constructor Summary
ConstructorsConstructorDescriptionDistancePointEvaluator(PointDistanceFunction distanceFunction, IDoubleRange distanceMod) DistancePointEvaluator(PointDistanceFunction distanceFunction, ISeedDoubleRange distanceMod) -
Method Summary
Modifier and TypeMethodDescriptionvoidevalPoint(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) Evaluate the distance to a cell-point in a 3D neighborhood, recording only the closest result.voidevalPoint(int seed, double x, double y, int cellHash, int cellX, int cellY, double cellPointX, double cellPointY, ResultBuffer.ResultBuffer2d buffer) Evaluate the distance to a cell-point in a 2D neighborhood, recording only the closest result.voidevalPoint2(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) Evaluate the distance to a cell-point in a 3D neighborhood, recording the closest and second-closest result.voidevalPoint2(int seed, double x, double y, int cellHash, int cellX, int cellY, double cellPointX, double cellPointY, ResultBuffer.ResultBuffer2d buffer) Evaluate the distance to a cell-point in a 2D neighborhood, recording the closest and second-closest result.static ISeedDoubleRangegetDistanceModifier(IDoubleRange range) static doublerandomDistanceModification(int seed) toString()Methods inherited from interface PointEvaluator
collectPoint, getJitter
-
Constructor Details
-
DistancePointEvaluator
-
DistancePointEvaluator
-
-
Method Details
-
evalPoint
public void evalPoint(int seed, double x, double y, int cellHash, int cellX, int cellY, double cellPointX, double cellPointY, @Nonnull ResultBuffer.ResultBuffer2d buffer) Description copied from interface:PointEvaluatorEvaluate the distance to a cell-point in a 2D neighborhood, recording only the closest result.- Specified by:
evalPointin interfacePointEvaluator- Parameters:
seed- The seed being sampled.x- The x-coordinate being sampled.y- The y-coordinate being sampled.cellHash- The seeded hash of the cell.cellX- The x-index of the cell.cellY- The y-index of the cell.cellPointX- The x-coordinate of the cell centre point.cellPointY- The y-coordinate of the cell centre point.buffer- The buffer into which the result of the evaluation is recorded.
-
evalPoint2
public void evalPoint2(int seed, double x, double y, int cellHash, int cellX, int cellY, double cellPointX, double cellPointY, @Nonnull ResultBuffer.ResultBuffer2d buffer) Description copied from interface:PointEvaluatorEvaluate the distance to a cell-point in a 2D neighborhood, recording the closest and second-closest result.- Specified by:
evalPoint2in interfacePointEvaluator- Parameters:
seed- The seed being sampled.x- The x-coordinate being sampled.y- The y-coordinate being sampled.cellHash- The seeded hash of the cell.cellX- The x-index of the cell.cellY- The y-index of the cell.cellPointX- The x-coordinate of the cell centre point.cellPointY- The y-coordinate of the cell centre point.buffer- The buffer into which the result of the evaluation is recorded.
-
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, @Nonnull ResultBuffer.ResultBuffer3d buffer) Description copied from interface:PointEvaluatorEvaluate the distance to a cell-point in a 3D neighborhood, recording only the closest result.- Specified by:
evalPointin interfacePointEvaluator- Parameters:
seed- The seed being sampled.x- The x-coordinate being sampled.y- The y-coordinate being sampled.z- The z-coordinate being sampled.cellHash- The seeded hash of the cell.cellX- The x-index of the cell.cellY- The y-index of the cell.cellZ- The z-index of the cell.cellPointX- The x-coordinate of the cell centre point.cellPointY- The y-coordinate of the cell centre point.cellPointZ- The z-coordinate of the cell centre point.buffer- The buffer into which the result of the evaluation is recorded.
-
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, @Nonnull ResultBuffer.ResultBuffer3d buffer) Description copied from interface:PointEvaluatorEvaluate the distance to a cell-point in a 3D neighborhood, recording the closest and second-closest result.- Specified by:
evalPoint2in interfacePointEvaluator- Parameters:
seed- The seed being sampled.x- The x-coordinate being sampled.y- The y-coordinate being sampled.z- The z-coordinate being sampled.cellHash- The seeded hash of the cell.cellX- The x-index of the cell.cellY- The y-index of the cell.cellZ- The z-index of the cell.cellPointX- The x-coordinate of the cell centre point.cellPointY- The y-coordinate of the cell centre point.cellPointZ- The z-coordinate of the cell centre point.buffer- The buffer into which the result of the evaluation is recorded.
-
toString
-
getDistanceModifier
-
randomDistanceModification
public static double randomDistanceModification(int seed)
-