Skip to content

Commit

Permalink
Added Bounds to API
Browse files Browse the repository at this point in the history
  • Loading branch information
Apostolique committed Feb 11, 2024
1 parent 0b20d6e commit b26766e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/AABBTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public float MoveConstant {
/// </summary>
public int Count => _tree.Count;

/// <summary>
/// Bounds of all the items in the tree.
/// </summary>
public RectangleF? Bounds => _tree.Root != AABB_TREE_NULL_NODE_INDEX ? _tree.AABBs[_tree.Root] : null;

/// <summary>
/// Adds a new leaf to the tree, and rebalances as necessary.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions Source/IntervalTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public float MoveConstant {
/// </summary>
public int Count => _tree.Count;

/// <summary>
/// Bounds of all the items in the tree.
/// </summary>
public Interval? Bounds => _tree.Root != INTERVAL_TREE_NULL_NODE_INDEX ? _tree.Intervals[_tree.Root] : null;

/// <summary>
/// Adds a new leaf to the tree, and rebalances as necessary.
/// </summary>
Expand Down

0 comments on commit b26766e

Please sign in to comment.