public void Contains(ref BoundingBoxXna boxXna, out ContainmentType result) { var intersects = false; PlaneIntersectionType type; boxXna.Intersects(ref near, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } boxXna.Intersects(ref left, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } boxXna.Intersects(ref right, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } boxXna.Intersects(ref top, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } boxXna.Intersects(ref bottom, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } boxXna.Intersects(ref far, out type); if (type == PlaneIntersectionType.Front) { result = ContainmentType.Disjoint; return; } if (type == PlaneIntersectionType.Intersecting) { intersects = true; } result = intersects ? ContainmentType.Intersects : ContainmentType.Contains; }
public bool Intersects(BoundingBoxXna boxXna) { return(boxXna.Intersects(this)); }
public PlaneIntersectionType Intersects(BoundingBoxXna boxXna) { return(boxXna.Intersects(this)); }