You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bea387e
Browse filesBrowse the repository at this point in the historyBrowse files
Debug.Assert(LeafCount>=2,"This implementation assumes all nodes are filled.");
30
+
Debug.Assert(LeafCount>=2||nodeIndex<0,"The node traversal assumes all nodes are filled; a single-leaf tree can only be entered through its encoded leaf index.");
Debug.Assert(LeafCount>=2,"This implementation assumes all nodes are filled.");
18
+
Debug.Assert(LeafCount>=2||nodeIndex<0,"The node traversal assumes all nodes are filled; a single-leaf tree can only be entered through its encoded leaf index.");
Debug.Assert(LeafCount>=2,"This implementation assumes all nodes are filled.");
14
+
Debug.Assert(LeafCount>=2||nodeIndex<0,"The node traversal assumes all nodes are filled; a single-leaf tree can only be entered through its encoded leaf index.");
// We rented a larger stack at some point. Return it.
73
-
pool.Return(refstack);
70
+
if(stack.Length>TraversalStackCapacity)
71
+
{
72
+
// We rented a larger stack at some point. Return it.
73
+
pool.Return(refstack);
74
74
}
75
75
}
76
76
77
-
/// <summary>
78
-
/// Finds and processes all leaves with bounding boxes that overlap the specified axis-aligned bounding box. The <paramref name="leafEnumerator"/> is invoked
79
-
/// for each overlapping element.
80
-
/// </summary>
81
-
/// <typeparam name="TEnumerator">The type of the <see cref="IBreakableForEach{T}"/> enumerator used to process the overlapping elements.</typeparam>
82
-
/// <param name="boundingBox">Query to test against the bounding volume hierarchy.</param>
77
+
/// <summary>
78
+
/// Finds and processes all leaves with bounding boxes that overlap the specified axis-aligned bounding box. The <paramref name="leafEnumerator"/> is invoked
79
+
/// for each overlapping element.
80
+
/// </summary>
81
+
/// <typeparam name="TEnumerator">The type of the <see cref="IBreakableForEach{T}"/> enumerator used to process the overlapping elements.</typeparam>
82
+
/// <param name="boundingBox">Query to test against the bounding volume hierarchy.</param>
83
83
/// <param name="pool">The buffer pool used for temporary allocations during the operation. Only used if the tree is pathologically deep; stack memory is used preferentially.</param>
84
-
/// <param name="leafEnumerator">A reference to the enumerator that processes the indices of overlapping elements. The enumerator can
85
-
/// terminate early by returning <see langword="false"/> from its iteration.</param>
84
+
/// <param name="leafEnumerator">A reference to the enumerator that processes the indices of overlapping elements. The enumerator can
85
+
/// terminate early by returning <see langword="false"/> from its iteration.</param>
@@ -102,16 +102,16 @@ public readonly unsafe void GetOverlaps<TEnumerator>(BoundingBox boundingBox, Bu
102
102
//If the leaf count is zero, then there's nothing to test against.
103
103
}
104
104
105
-
/// <summary>
106
-
/// Finds and processes all leaves with bounding boxes that overlap the specified axis-aligned bounding box. The <paramref name="leafEnumerator"/> is invoked
107
-
/// for each overlapping element.
108
-
/// </summary>
109
-
/// <typeparam name="TEnumerator">The type of the <see cref="IBreakableForEach{T}"/> enumerator used to process the overlapping elements.</typeparam>
110
-
/// <param name="min">The minimum corner of the axis-aligned bounding box.</param>
111
-
/// <param name="max">The maximum corner of the axis-aligned bounding box.</param>
105
+
/// <summary>
106
+
/// Finds and processes all leaves with bounding boxes that overlap the specified axis-aligned bounding box. The <paramref name="leafEnumerator"/> is invoked
107
+
/// for each overlapping element.
108
+
/// </summary>
109
+
/// <typeparam name="TEnumerator">The type of the <see cref="IBreakableForEach{T}"/> enumerator used to process the overlapping elements.</typeparam>
110
+
/// <param name="min">The minimum corner of the axis-aligned bounding box.</param>
111
+
/// <param name="max">The maximum corner of the axis-aligned bounding box.</param>
112
112
/// <param name="pool">The buffer pool used for temporary allocations during the operation. Only used if the tree is pathologically deep; stack memory is used preferentially.</param>
113
-
/// <param name="leafEnumerator">A reference to the enumerator that processes the indices of overlapping elements. The enumerator can
114
-
/// terminate early by returning <see langword="false"/> from its iteration.</param>
113
+
/// <param name="leafEnumerator">A reference to the enumerator that processes the indices of overlapping elements. The enumerator can
114
+
/// terminate early by returning <see langword="false"/> from its iteration.</param>
0 commit comments