Quadtree<O extends Rect> class
Null safety
- Available Extensions
Constructors
Properties
- bounds → Rect
-
final
- depth → int
-
final
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- maxDepth → int
-
final
- maxObjects → int
-
final
-
nodes
→ Map<
Quadrant, Quadtree< O> > -
Subnodes of the
Quadtree
.final -
objects
→ List<
O> -
Objects contained within the node
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
clear(
) → void - Clear the Quadtree
-
getQuadrants(
Rect object) → List< Quadrant> - Determines which quadrants the object belongs to.
-
insert(
O object) → void - Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
retrieve(
Rect bounds) → List< O> - Return all objects that could collide with the given object, given bounds.
-
retrieveAllNodes(
[Quadtree< O> ? quadtree]) → List<Rect> -
split(
) → void - Split the node into 4 subnodes (ne, nw, sw, se)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override