Class AABB<T>

java.lang.Object
com.prineside.tdi2.utils.AABB<T>

public final class AABB<T> extends Object
  • Field Details

    • NO_FILTER

      public static final AABB.EntryFilter NO_FILTER
    • debugBatch

      public com.badlogic.gdx.graphics.g2d.Batch debugBatch
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getMinX

      public float getMinX()
    • getMaxX

      public float getMaxX()
    • getMinY

      public float getMinY()
    • getMaxY

      public float getMaxY()
    • getCols

      public short getCols()
    • getRows

      public short getRows()
    • getCellSizeXInv

      public float getCellSizeXInv()
    • getCellSizeYInv

      public float getCellSizeYInv()
    • getEntityCount

      public int getEntityCount(int cellIdx)
    • entriesExistInRect

      public boolean entriesExistInRect(float minX, float minY, float maxX, float maxY)
    • lineCanHitEntry

      public boolean lineCanHitEntry(float x1, float y1, float x2, float y2)
    • traverseEntriesInRect

      public void traverseEntriesInRect(float minX, float minY, float maxX, float maxY, AABB.EntryFilter filter, AABB.EntryRetriever<T> cb)
      Check entriesExistInRect() before calling this Traverse through entities touching the rectangle Very broad but does the job
    • traverseEntriesInLine

      public void traverseEntriesInLine(float x1, float y1, float x2, float y2, AABB.EntryFilter filter, AABB.EntryRetriever<T> cb)