Beispiel #1
0
        /// <summary>
        /// Is the plane hits part of the bound?
        /// </summary>
        public bool IsIntersecting(Plane4 plane)
        {
            var r = Vector4.Dot(extent, Vector4.Abs(plane.normal));
            var s = Vector4.Dot(center, plane.normal) - plane.distance;

            return(Math.Abs(s) <= r);
        }
Beispiel #2
0
 /// <summary>
 /// Is the sphere overlap the plane?
 /// </summary>
 public static bool IsIntersecting(Plane4 plane, SphereBounds4 sphere)
 {
     return(Math.Abs(plane.Distance(sphere.center)) < sphere.radius);
 }