コード例 #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));
 }