shared/spatial/spatial library
Ultra-fast spatial indexing system for 2D objects
This module provides unified spatial indexing for all graph elements: nodes, ports, connection segments, and annotations.
Key features:
- Single unified index for all element types
- Type-based filtering for targeted queries
- Grid-based spatial hashing for O(1) performance
- Smart caching with automatic invalidation
Classes
- AnnotationSpatialItem
- Spatial item for an annotation.
- ConnectionSegmentItem
- Spatial item for a segment of a connection path.
-
GraphSpatialIndex<
T> - Simplified, type-safe spatial index for graph elements.
- HitTestResult
- Result of a hit test operation.
- NodeSpatialItem
- Spatial item for a node.
- PortSpatialItem
- Spatial item for a port on a node.
-
SpatialGrid<
T extends SpatialIndexable> -
Ultra-fast spatial grid system using grid-based hashing.
This is the low-level implementation used by
SpatialIndex. Optimized for large numbers of 2D objects with frequent position updates. - SpatialIndexable
- Generic spatial indexing interface for 2D objects
- SpatialIndexStats
- Performance statistics for the spatial index
- SpatialItem
- Sealed class hierarchy for spatial items in the node flow graph.
Enums
- HitTarget
- Hit test target types for different UI elements.
Extensions
- SpatialItemFactories on SpatialItem
- Extension to provide factory-style constructors for spatial items.
- SpatialItemTypeChecks on SpatialItem
- Extension for convenient type checking.