Contents
Class GridCache<T>
java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.GridCache<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGridCache(org.joml.Vector3dc cellSize, int capacity, int concurrencyLevel, BiFunction<org.joml.Vector3i, GraphGenerator, T> computeValue) -
Method Summary
Modifier and TypeMethodDescriptiongetCell(org.joml.Vector3i cellIndex, GraphGenerator graphGenerator) static booleanisValidCellSize(org.joml.Vector3dc value) voidtoCellBounds(org.joml.Vector3ic cellIndex, Bounds3d cellBounds_out) static voidtoCellBounds(org.joml.Vector3ic cellIndex, org.joml.Vector3dc gridSize, Bounds3d cellBounds_out) static inttoCellIndex(double position, double gridSize) static voidtoCellIndex(org.joml.Vector3dc position, org.joml.Vector3dc gridSize, org.joml.Vector3i cellIndex_out) voidtoCellIndex(org.joml.Vector3dc position, org.joml.Vector3i cellIndex_out) static doubletoCellMax(int cellIndex, double gridSize) static doubletoCellMin(int cellIndex, double gridSize)
-
Constructor Details
-
GridCache
public GridCache(@Nonnull org.joml.Vector3dc cellSize, int capacity, int concurrencyLevel, @Nonnull BiFunction<org.joml.Vector3i, GraphGenerator, T> computeValue)
-
-
Method Details
-
getCell
@Nullable public T getCell(@Nonnull org.joml.Vector3i cellIndex, @Nonnull GraphGenerator graphGenerator) -
toCellIndex
public void toCellIndex(@Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3i cellIndex_out) -
toCellIndex
public static void toCellIndex(@Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3dc gridSize, @Nonnull org.joml.Vector3i cellIndex_out) -
toCellBounds
-
toCellBounds
public static void toCellBounds(@Nonnull org.joml.Vector3ic cellIndex, @Nonnull org.joml.Vector3dc gridSize, @Nonnull Bounds3d cellBounds_out) -
toCellIndex
public static int toCellIndex(double position, double gridSize) -
toCellMin
public static double toCellMin(int cellIndex, double gridSize) -
toCellMax
public static double toCellMax(int cellIndex, double gridSize) -
isValidCellSize
public static boolean isValidCellSize(@Nonnull org.joml.Vector3dc value)
-