public void Contains(ref BoundingSphere sphere, out ContainmentType result) { bool intersects = false; for (int i = 0; i < PlaneCount; ++i) { PlaneIntersectionType planeIntersectionType = default(PlaneIntersectionType); // TODO: we might want to inline this for performance reasons sphere.Intersects(ref planes[i], out planeIntersectionType); switch (planeIntersectionType) { case PlaneIntersectionType.Front: result = ContainmentType.Disjoint; return; case PlaneIntersectionType.Intersecting: intersects = true; break; } } result = intersects ? ContainmentType.Intersects : ContainmentType.Contains; }
public void Intersects(ref BoundingSphere sphere, out PlaneIntersectionType result) { sphere.Intersects(ref this, out result); }
/* * public PlaneIntersectionType Intersects(BoundingFrustum frustum) * { * return frustum.Intersects(this); * } */ public PlaneIntersectionType Intersects(BoundingSphere sphere) { return(sphere.Intersects(this)); }