/// <summary> /// Checks whether the current BoundingSphere intersects with a specified BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to check for intersection with the current BoundingSphere.</param> public bool Intersects(BoundingFrustum frustum) { bool result; frustum.Intersects(ref this, out result); return(result); }
public bool Intersects(BoundingFrustum frustum) { bool flag; frustum.Intersects(ref this, out flag); return(flag); }
/// <summary> /// Checks whether the current BoundingBox intersects a BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to check for intersection with.</param> public bool Intersects(BoundingFrustum frustum) { if ((BoundingFrustum)null == frustum) { throw new ArgumentNullException("frustum"); } else { return(frustum.Intersects(this)); } }
/// <summary> /// Checks whether the Ray intersects a specified BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to check for intersection with the Ray.</param> public float?Intersects(BoundingFrustum frustum) { if (frustum == (BoundingFrustum)null) { throw new ArgumentNullException("frustum"); } else { return(frustum.Intersects(this)); } }
/// <summary> /// Tests whether the BoundingBox contains a BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to test for overlap.</param> public ContainmentType Contains(BoundingFrustum frustum) { if (!frustum.Intersects(this)) { return(ContainmentType.Disjoint); } foreach (Vector3 point in frustum.cornerArray) { if (this.Contains(point) == ContainmentType.Disjoint) { return(ContainmentType.Intersects); } } return(ContainmentType.Contains); }
/// <summary> /// Checks whether the current BoundingSphere contains the specified BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to check against the current BoundingSphere.</param> public ContainmentType Contains(BoundingFrustum frustum) { if (!frustum.Intersects(this)) { return(ContainmentType.Disjoint); } float num = this.Radius * this.Radius; foreach (Vector3 vector3_1 in frustum.cornerArray) { Vector3 vector3_2; vector3_2.X = vector3_1.X - this.Center.X; vector3_2.Y = vector3_1.Y - this.Center.Y; vector3_2.Z = vector3_1.Z - this.Center.Z; if ((double)vector3_2.LengthSquared() > (double)num) { return(ContainmentType.Intersects); } } return(ContainmentType.Contains); }
public float?Intersects(BoundingFrustum frustum) => frustum?.Intersects(this);
/// <summary> /// Checks whether the current Plane intersects a specified BoundingFrustum. /// </summary> /// <param name="frustum">The BoundingFrustum to check for intersection with.</param> public PlaneIntersectionType Intersects(BoundingFrustum frustum) { return(frustum.Intersects(this)); }
public PlaneIntersectionType Intersects(BoundingFrustum frustum) => frustum.Intersects(this);