A - The precise type of quadtree memberspublic interface QuadTreeReadableIType<A> extends QuadTreeReadableType
int coordinates.| Modifier and Type | Method and Description |
|---|---|
com.io7m.jregions.core.unparameterized.areas.AreaI |
areaFor(A item) |
com.io7m.jregions.core.unparameterized.areas.AreaI |
bounds() |
void |
containedBy(com.io7m.jregions.core.unparameterized.areas.AreaI area,
Set<A> items)
Returns all objects in the tree that are completely contained within
area, saving the results to items. |
boolean |
contains(A item)
Determine whether or not the object has already been inserted into the
tree.
|
<C> void |
iterateQuadrants(C context,
QuadTreeQuadrantIterationIType<A,C> f)
Iterate over all quadrants within the tree.
|
<B> QuadTreeReadableIType<B> |
map(BiFunction<A,com.io7m.jregions.core.unparameterized.areas.AreaI,B> f)
Apply
f to each element of the tree. |
void |
overlappedBy(com.io7m.jregions.core.unparameterized.areas.AreaI area,
Set<A> items)
Returns all objects in the tree that are overlapped
area, saving the results to items. |
void |
raycast(Ray2D ray,
SortedSet<QuadTreeRaycastResultI<A>> items)
Returns all objects that are intersected by the given ray.
|
isEmpty, sizecom.io7m.jregions.core.unparameterized.areas.AreaI bounds()
boolean contains(A item)
item - The objecttrue iff the object is in the tree<B> QuadTreeReadableIType<B> map(BiFunction<A,com.io7m.jregions.core.unparameterized.areas.AreaI,B> f)
f to each element of the tree.B - The type of result elementsf - A mapping function<C> void iterateQuadrants(C context,
QuadTreeQuadrantIterationIType<A,C> f)
C - The type of context valuescontext - A contextual value passed to ff - An iteration functioncom.io7m.jregions.core.unparameterized.areas.AreaI areaFor(A item) throws NoSuchElementException
item - The itemitemNoSuchElementException - Iff the item is not present in the treevoid containedBy(com.io7m.jregions.core.unparameterized.areas.AreaI area,
Set<A> items)
area, saving the results to items.area - The area to examineitems - The returned itemsvoid overlappedBy(com.io7m.jregions.core.unparameterized.areas.AreaI area,
Set<A> items)
area, saving the results to items.area - The area to examineitems - The returned itemsvoid raycast(Ray2D ray, SortedSet<QuadTreeRaycastResultI<A>> items)
ray - The rayitems - The intersected itemsCopyright © 2017 <code@io7m.com> http://io7m.com