public class GeoRangeQuery<T> extends IntersectGeoGrossGate<T>
A query that finds all elements whose AABBs are completely or partially within a given range from a given AABB
. The matching elements do not necessarily lie completely within the range, but their AABBs contain at least one point that lies within the range.
Constructor and Description |
---|
GeoRangeQuery(Datum datum,
AABB aabb,
double range) |
Modifier and Type | Method and Description |
---|---|
AABB |
getAABB() |
Datum |
getDatum() |
double |
getRange() |
co.paralleluniverse.db.tree.QueryResult |
queryContainer(AABB aabb)
Called by SpaceBase to inquire whether any of the elements contained in the given
AABB may match the query. |
co.paralleluniverse.db.tree.QueryResult |
queryContainer(IndexedAABB aabbs,
int index)
Called by SpaceBase to inquire whether any of the elements contained in the given
AABB may match the query. |
boolean |
queryElement(AABB aabb,
T elem)
Called by SpaceBase to inquire whether an element with the given bounding-box matches the query.
|
String |
toString() |
getGate
public String toString()
toString
in class IntersectGeoGrossGate<T>
public co.paralleluniverse.db.tree.QueryResult queryContainer(IndexedAABB aabbs, int index)
FastSpatialQuery
Called by SpaceBase to inquire whether any of the elements contained in the given AABB
may match the query.
queryContainer
in interface FastSpatialQuery<T>
queryContainer
in class IntersectGeoGrossGate<T>
aabbs
- An indexed bounding-box of a group of elements.index
- The index of the bounding box inside the given IndexedAABB
QueryResult
specifying whether NONE
of the elements within the box matches the query, ALL
of them do, or SOME
could possibly match.IndexedAABB
public co.paralleluniverse.db.tree.QueryResult queryContainer(AABB aabb)
SpatialQuery
Called by SpaceBase to inquire whether any of the elements contained in the given AABB
may match the query.
queryContainer
in interface SpatialQuery<T>
queryContainer
in class IntersectGeoGrossGate<T>
aabb
- The bounding-box of the group of elements.QueryResult
specifying whether NONE
of the elements within the box matches the query, ALL
of them do, or SOME
could possibly match.public boolean queryElement(AABB aabb, T elem)
SpatialQuery
Called by SpaceBase to inquire whether an element with the given bounding-box matches the query.
queryElement
in interface SpatialQuery<T>
queryElement
in class IntersectGeoGrossGate<T>
aabb
- The element’s bounding-box.elem
- The element.true
if the element matches the query, or false
if it does not.public double getRange()
public AABB getAABB()
public Datum getDatum()