QuadTree$QueryResult extension type
View over a Float32List that represents a query result.
- on
Properties
-
ids
→ Iterable<
int> -
Returns an iterable of object identifiers.
no setter
- isEmpty → bool
-
Whether this query result is empty and has no objects.
no setter
- isNotEmpty → bool
-
Whether this query result is not empty and has objects.
no setter
- length → int
-
The number of objects in this query result.
no setter
Methods
-
forEach(
bool cb(int id, double left, double top, double width, double height)) → void - Visit all objects in this query result. The walk stops when it iterates over all objects or when the callback returns false.
-
toMap(
) → Map< int, Rect> - Returns an unordered map of object identifiers and their bounds.
Constants
- sizePerObject → const int
- Returns the number of bytes reserved for each object in the query result.