Package com.prineside.tdi2.utils
Class AABB<T>
java.lang.Object
com.prineside.tdi2.utils.AABB<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static final class
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
entriesExistInRect
(float minX, float minY, float maxX, float maxY) float
float
short
getCols()
int
getEntityCount
(int cellIdx) float
getMaxX()
float
getMaxY()
float
getMinX()
float
getMinY()
short
getRows()
boolean
isEmpty()
boolean
lineCanHitEntry
(float x1, float y1, float x2, float y2) void
traverseEntriesInLine
(float x1, float y1, float x2, float y2, AABB.EntryFilter filter, AABB.EntryRetriever<T> cb) 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
-
Field Details
-
NO_FILTER
-
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)
-