Axis-Aligned Bounding Box
Example #1
0
 /// <summary>
 /// Checks if a Ray intersects an AABB.
 /// </summary>
 /// <param name="box">The AABB in question.</param>
 /// <param name="ray">The Ray in question.</param>
 /// <returns>True if the two intersect.</returns>
 public static bool Intersects(AABB box, Ray ray)
 {
     return box.Bounds.Intersects(ray) != null;
 }
Example #2
0
 public void CreateAABB(Vector3 min, Vector3 max)
 {
     AABB = new AABB(min, max);
 }
Example #3
0
 /// <summary>
 /// Checks if two AABBs intersect.
 /// </summary>
 /// <param name="box1">One AABB</param>
 /// <param name="box2">The other AABB</param>
 /// <returns>True if the two intersect.</returns>
 public static bool Intersects(AABB box1, AABB box2)
 {
     return true;
     //return box1.Bounds.Intersects(box2.Bounds);
 }