diff --git a/Source/AABBTree.cs b/Source/AABBTree.cs index 4eeb145..7c49ba0 100644 --- a/Source/AABBTree.cs +++ b/Source/AABBTree.cs @@ -63,6 +63,11 @@ public float MoveConstant { /// public int Count => _tree.Count; + /// + /// Bounds of all the items in the tree. + /// + public RectangleF? Bounds => _tree.Root != AABB_TREE_NULL_NODE_INDEX ? _tree.AABBs[_tree.Root] : null; + /// /// Adds a new leaf to the tree, and rebalances as necessary. /// diff --git a/Source/IntervalTree.cs b/Source/IntervalTree.cs index e33fa2a..2158355 100644 --- a/Source/IntervalTree.cs +++ b/Source/IntervalTree.cs @@ -61,6 +61,11 @@ public float MoveConstant { /// public int Count => _tree.Count; + /// + /// Bounds of all the items in the tree. + /// + public Interval? Bounds => _tree.Root != INTERVAL_TREE_NULL_NODE_INDEX ? _tree.Intervals[_tree.Root] : null; + /// /// Adds a new leaf to the tree, and rebalances as necessary. ///