Beispiel #1
0
 /// <summary>
 ///		Sphere/Plane intersection test.
 /// </summary>
 /// <param name="sphere"></param>
 /// <param name="plane"></param>
 /// <returns>True if there was an intersection, false otherwise.</returns>
 public static bool Intersects(Sphere sphere, Plane plane)
 {
     return(MathUtil.Abs(plane.Normal.Dot(sphere.Center)) <= sphere.Radius);
 }
Beispiel #2
0
 public static IntersectResult Intersects(Ray ray, Sphere sphere)
 {
     return(Intersects(ray, sphere, false));
 }