NodeSpatialIndex<T> class

Specialized spatial index for managing Node objects

Constructors

NodeSpatialIndex({double gridSize = 500.0, bool enableCaching = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
isUsingSpatialGrid bool
Check if spatial grid is being used for performance
no setter
nodeCount int
Get total number of nodes in the index
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stats SpatialIndexStats
Get performance statistics
no setter

Methods

addOrUpdateNode(Node<T> node) → void
Add or update a node in the spatial index
clear() → void
Clear all nodes from the spatial index
endNodeDragging() → void
End drag optimization and rebuild spatial index for dragged nodes
flushPendingUpdates() → void
Force process any pending spatial index updates immediately
getNode(String nodeId) Node<T>?
Get node by ID
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryNodes(Rect bounds) List<Node<T>>
Get all nodes that intersect with the given bounds
rebuildFromNodes(Iterable<Node<T>> nodes) → void
Rebuild the entire spatial index (use sparingly)
removeNode(String nodeId) → void
Remove a node from the spatial index
startNodeDragging(List<String> nodeIds) → void
Start drag optimization for specified node IDs
toString() String
A string representation of this object.
inherited
updateDraggingNodes(List<Node<T>> nodes) → void
Update spatial index for nodes that are currently being dragged

Operators

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