예제 #1
0
 /// <summary>
 /// Gets type of intersection between specified <see cref="Plane"/> and this <see cref="BoundingFrustum"/>.
 /// </summary>
 /// <param name="plane">A <see cref="Plane"/> for intersection test.</param>
 /// <param name="result">A plane intersection type as an output parameter.</param>
 public void Intersects(ref Plane plane, out PlaneIntersectionType result)
 {
     result = plane.Intersects(ref corners[0]);
     for (int i = 1; i < corners.Length; i += 1)
     {
         if (plane.Intersects(ref corners[i]) != result)
         {
             result = PlaneIntersectionType.Intersecting;
         }
     }
 }
예제 #2
0
        //bool Intersects( BoundingBox box, Ray ray, out float distance )
        //{
        //    return Ray.Intersects( ray, box, distance );
        //}

        public static PlaneIntersectionType Intersects(BoundingBox box, Plane plane)
        {
            return(Plane.Intersects(plane, box));
        }
예제 #3
0
        //bool Intersects( BoundingSphere sphere, Ray ray, out float distance )
        //{
        //    return Ray.Intersects( ray, sphere, distance );
        //}

        public static PlaneIntersectionType Intersects(BoundingSphere sphere, Plane plane)
        {
            return(Plane.Intersects(plane, sphere));
        }