/// <summary> /// Checks if outerBounds encapsulates innerBounds. /// </summary> /// <param name="outerBounds">Outer bounds.</param> /// <param name="innerBounds">Inner bounds.</param> /// <returns>True if innerBounds is fully encapsulated by outerBounds.</returns> private static bool Encapsulates(BoundingBox outerBounds, BoundingBox innerBounds) { return(outerBounds.Contains(innerBounds.Min) && outerBounds.Contains(innerBounds.Max)); }
/// <summary> /// Checks if outerBounds encapsulates the given point. /// </summary> /// <param name="outerBounds">Outer bounds.</param> /// <param name="point">Point.</param> /// <returns>True if innerBounds is fully encapsulated by outerBounds.</returns> private static bool Encapsulates(BoundingBox outerBounds, Point point) { return(outerBounds.Contains(point)); }