getStats method

QuadTreeStats getStats()

Returns statistics about the QuadTree structure

Implementation

QuadTreeStats getStats() {
  final stats = _StatsCollector();
  stats.maxDepth = level;
  _collectStats(this, stats);

  return QuadTreeStats(
    totalNodes: stats.nodeCount,
    leafQuadrants: stats.leafCount,
    maxDepth: stats.maxDepth,
    bounds: bounds,
  );
}