Example #1
0
 /// <summary>
 /// Check if the specified bounds intersect with anything in the tree. See also: GetColliding.
 /// </summary>
 /// <param name="checkBounds">bounds to check.</param>
 /// <returns>True if there was a collision.</returns>
 public bool IsColliding(BoundingBox checkBounds)
 {
     return(_rootNode.IsColliding(ref checkBounds));
 }
Example #2
0
 /// <summary>
 /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding.
 /// </summary>
 /// <param name="collidingWith">list to store intersections.</param>
 /// <param name="checkBounds">bounds to check.</param>
 /// <returns>Objects that intersect with the specified bounds.</returns>
 public void GetColliding(List <T> collidingWith, BoundingBox checkBounds)
 {
     _rootNode.GetColliding(ref checkBounds, collidingWith);
 }
Example #3
0
 /// <summary>
 /// Grows the bounding box include the other box.
 /// </summary>
 /// <param name="box">The specified box to include.</param>
 public void Encapsulate(BoundingBox box)
 {
     Encapsulate(box.Center - box.Extents);
     Encapsulate(box.Center + box.Extents);
 }