Class GridCache<T>

java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.GridCache<T>

public class GridCache<T> extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    GridCache(org.joml.Vector3dc cellSize, int capacity, int concurrencyLevel, BiFunction<org.joml.Vector3i, GraphGenerator, T> computeValue)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getCell(org.joml.Vector3i cellIndex, GraphGenerator graphGenerator)
     
    static boolean
    isValidCellSize(org.joml.Vector3dc value)
     
    void
    toCellBounds(org.joml.Vector3ic cellIndex, Bounds3d cellBounds_out)
     
    static void
    toCellBounds(org.joml.Vector3ic cellIndex, org.joml.Vector3dc gridSize, Bounds3d cellBounds_out)
     
    static int
    toCellIndex(double position, double gridSize)
     
    static void
    toCellIndex(org.joml.Vector3dc position, org.joml.Vector3dc gridSize, org.joml.Vector3i cellIndex_out)
     
    void
    toCellIndex(org.joml.Vector3dc position, org.joml.Vector3i cellIndex_out)
     
    static double
    toCellMax(int cellIndex, double gridSize)
     
    static double
    toCellMin(int cellIndex, double gridSize)
     

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void toCellBounds(@Nonnull org.joml.Vector3ic cellIndex, @Nonnull Bounds3d cellBounds_out)
    • 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)