Skip to content

Commit b26766e

Browse files
committed
Added Bounds to API
1 parent 0b20d6e commit b26766e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Source/AABBTree.cs

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public float MoveConstant {
6363
/// </summary>
6464
public int Count => _tree.Count;
6565

66+
/// <summary>
67+
/// Bounds of all the items in the tree.
68+
/// </summary>
69+
public RectangleF? Bounds => _tree.Root != AABB_TREE_NULL_NODE_INDEX ? _tree.AABBs[_tree.Root] : null;
70+
6671
/// <summary>
6772
/// Adds a new leaf to the tree, and rebalances as necessary.
6873
/// </summary>

Source/IntervalTree.cs

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public float MoveConstant {
6161
/// </summary>
6262
public int Count => _tree.Count;
6363

64+
/// <summary>
65+
/// Bounds of all the items in the tree.
66+
/// </summary>
67+
public Interval? Bounds => _tree.Root != INTERVAL_TREE_NULL_NODE_INDEX ? _tree.Intervals[_tree.Root] : null;
68+
6469
/// <summary>
6570
/// Adds a new leaf to the tree, and rebalances as necessary.
6671
/// </summary>

0 commit comments

Comments
 (0)