QuadTree<T> class

Constructors

QuadTree(OffsetFun<T> xFun, OffsetFun<T> yFun, num _x0, num _y0, num _x1, num _y1)

Properties

boundRect → Rect
no setter
data → List<T>
no setter
hashCode → int
The hash code for this object.
no setterinherited
root → QuadNode?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
no setter
xFun ↔ OffsetFun<T>
getter/setter pair
yFun ↔ OffsetFun<T>
getter/setter pair

Methods

add(T data) → QuadTree
addAll(List<T> data) → QuadTree<T>
copy() → QuadTree<T>
cover(num x, num y) → QuadTree<T>
each(VisitCallback<T> callback) → QuadTree<T>
eachAfter(VisitCallback<T> callback) → QuadTree<T>
extent(Rect rect) → QuadTree<T>
拓展四叉树范围 如果指定了area,则扩展四叉树以覆盖到指定的点[x0, y0, x1, y1] 并返回四叉树。 如果没有指定position,则返回四叉树当前的范围[x0, y0, x1, y1],
find(int x, int y, [double? r]) → T?
返回离给定搜索半径的位置⟨x,y⟩最近的基准点。 如果没有指定半径,默认为无穷大。 如果在搜索范围内没有基准点,则返回未定义
leafCopy(QuadNode<T> leaf) → QuadNode<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(T d) → QuadTree<T>
removeAll(List<T> data) → QuadTree<T>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

simple<T>(OffsetFun<T> xFun, OffsetFun<T> yFun, List<T> nodes) → QuadTree<T>