/// <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; } } }
//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)); }
//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)); }