A - The precise type of quadtree memberspublic interface QuadTreeIType<A> extends QuadTreeReadableIType<A>
int integer coordinates.| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all objects from the tree.
|
boolean |
insert(A item,
com.io7m.jregions.core.unparameterized.areas.AreaI bounds)
Insert the object
item into the quadtree. |
<B> QuadTreeIType<B> |
map(BiFunction<A,com.io7m.jregions.core.unparameterized.areas.AreaI,B> f)
Apply
f to each element of the tree. |
boolean |
remove(A item)
Remove the object
item from the quadtree. |
void |
trim()
Trim all empty quadrants from the tree.
|
areaFor, bounds, containedBy, contains, iterateQuadrants, overlappedBy, raycastisEmpty, sizeboolean insert(A item, com.io7m.jregions.core.unparameterized.areas.AreaI bounds)
Insert the object item into the quadtree.
The function returns false if the object could not be
inserted for any reason (perhaps due to being too large).
If the object is already in the tree, it is replaced. This can be used to update the bounds of an object within the tree.
item - The object to insertbounds - The object's boundstrue if the object was insertedboolean remove(A item)
Remove the object item from the quadtree.
The function returns false if the object could not be
removed for any reason (perhaps due to not being in the tree in the first
place).
item - The object to removetrue if the object was removedvoid clear()
void trim()
<B> QuadTreeIType<B> map(BiFunction<A,com.io7m.jregions.core.unparameterized.areas.AreaI,B> f)
f to each element of the tree.map in interface QuadTreeReadableIType<A>B - The type of result elementsf - A mapping functionCopyright © 2017 <code@io7m.com> http://io7m.com