/// <summary> /// Initializes a new instance of the <see cref="Rect3F"/> struct. /// </summary> /// <param name="location">The location.</param> /// <param name="size">The size.</param> public Rect3F(Point3F location, Size3F size) { if (size.IsEmpty) { this = Empty; } else { _X = location.X; _Y = location.Y; _Z = location.Z; _SizeX = size.X; _SizeY = size.Y; _SizeZ = size.Z; } }
public static Point3F Subtract(Vector3F vector, Point3F point) { return(new Point3F(vector.X - point.X, vector.Y - point.Y, vector.Z - point.Z)); }
public static Point3F Add(Vector3F vector, Point3F point) { return(new Point3F(vector.X + point.X, vector.Y + point.Y, vector.Z + point.Z)); }
public bool Equals(Point3F value) { return(Equals(this, value)); }
/// <summary> /// Unions the specified rect. /// </summary> /// <param name="rect">The rect.</param> /// <param name="point">The point.</param> /// <returns></returns> public static Rect3F Union(Rect3F rect, Point3F point) { rect.Union(new Rect3F(point, point)); return(rect); }
/// <summary> /// Unions the specified point. /// </summary> /// <param name="point">The point.</param> public void Union(Point3F point) { Union(new Rect3F(point, point)); }
/// <summary> /// Determines whether [contains] [the specified point]. /// </summary> /// <param name="point">The point.</param> /// <returns> /// <c>true</c> if [contains] [the specified point]; otherwise, <c>false</c>. /// </returns> public bool Contains(Point3F point) { return(Contains(point.X, point.Y, point.Z)); }