Class SpatialHashGrid<T>

java.lang.Object
com.hypixel.hytale.builtin.portals.utils.spatial.SpatialHashGrid<T>

public class SpatialHashGrid<T> extends Object
  • Field Details

  • Constructor Details

    • SpatialHashGrid

      public SpatialHashGrid(double cellSize)
  • Method Details

    • cellFor

      private Vector3i cellFor(Vector3d p)
    • getAll

      public Collection<? extends T> getAll()
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • add

      public void add(Vector3d pos, T value)
    • remove

      public boolean remove(T value)
    • removeIf

      public void removeIf(Predicate<T> predicate)
    • move

      public void move(T value, Vector3d newPos)
    • queryRange

      public Map<T,Vector3d> queryRange(Vector3d center, double radius)
    • findClosest

      @Nullable public T findClosest(Vector3d center, double searchRadius)
    • hasAnyWithin

      public boolean hasAnyWithin(Vector3d center, double radius)
    • query

      private void query(Vector3d center, double radius, SpatialHashGrid.CellVisitor<T> visitor)