public static void Normalize <Rect, T>(this Rect r) where Rect : IRectangle3Base <T> where T : IComparable <T> { T z1 = r.X1, z2 = r.X2; if (r.Z2.CompareTo(r.Z1) < 0) { r.SetZRange(z2, z1); } RectangleExt.Normalize <Rect, T>(r); }
public static BoundingBox <T> ToBoundingBox <T>(this IEnumerator <Point <T> > e) where T : IConvertible, IComparable <T>, IEquatable <T> { if (!e.MoveNext()) { return(null); } var bb = new BoundingBox <T>(e.Current); while (e.MoveNext()) { RectangleExt.ExpandToInclude <BoundingBox <T>, Point <T>, T>(bb, e.Current); } return(bb); }
public static bool Overlaps <T>(this BoundingBox <T> self, BoundingBox <T> other) where T : IConvertible, IComparable <T>, IEquatable <T> { return(RectangleExt.Overlaps <BoundingBox <T>, T>(self, other)); }
public static bool Contains <T>(this BoundingBox <T> self, Point <T> point) where T : IConvertible, IComparable <T>, IEquatable <T> { return(RectangleExt.Contains <BoundingBox <T>, Point <T>, T>(self, point)); }
public static bool ExpandToInclude <T>(this BoundingBox <T> self, IEnumerable <Point <T> > points) where T : IConvertible, IComparable <T>, IEquatable <T> { return(RectangleExt.ExpandToInclude <BoundingBox <T>, Point <T>, T>(self, points)); }
public static BoundingBox <T> Intersect <T>(this BoundingBox <T> self, BoundingBox <T> b) where T : IConvertible, IComparable <T>, IEquatable <T> { return(RectangleExt.Intersect <BoundingBox <T>, T>(self, b)); }
public static void Normalize <T>(this BoundingBox <T> self) where T : IConvertible, IComparable <T>, IEquatable <T> { RectangleExt.Normalize <BoundingBox <T>, T>(self); }