예제 #1
0
 /// <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;
     }
 }
예제 #2
0
 public static Point3F Subtract(Vector3F vector, Point3F point)
 {
     return(new Point3F(vector.X - point.X, vector.Y - point.Y, vector.Z - point.Z));
 }
예제 #3
0
 public static Point3F Add(Vector3F vector, Point3F point)
 {
     return(new Point3F(vector.X + point.X, vector.Y + point.Y, vector.Z + point.Z));
 }
예제 #4
0
 public bool Equals(Point3F value)
 {
     return(Equals(this, value));
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
 /// <summary>
 /// Unions the specified point.
 /// </summary>
 /// <param name="point">The point.</param>
 public void Union(Point3F point)
 {
     Union(new Rect3F(point, point));
 }
예제 #7
0
 /// <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));
 }