Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs =================================================================== diff -u -r4898 -r5028 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs (.../Point2D.cs) (revision 4898) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs (.../Point2D.cs) (revision 5028) @@ -57,8 +57,6 @@ /// public double Z { get; set; } - public string Name { get; set; } - /// /// Determines whether the location of the given point and this one are the same. /// @@ -109,4 +107,34 @@ return String.Compare(ToString(), obj.ToString(), StringComparison.Ordinal); } + + /// + /// Initializes the point coordinates wi th the coordinates of the given point + /// + /// + public void Init(Point2D aPoint) + { + X = aPoint.X; + Z = aPoint.Z; + } + + /// + /// The name for a point (must be here for the IGeometryObject interface) + /// + public string Name { get; set; } + + public static Point2D operator -(Point2D aPoint2, Point2D aPoint1) + { + return new Point2D(aPoint2.X - aPoint1.X, aPoint2.Z - aPoint1.Z); + } + + public static Point2D operator *(double aValue1, Point2D aPoint1) + { + return new Point2D(aValue1 * aPoint1.X, aValue1 * aPoint1.Z); + } + + public static Point2D operator +(Point2D aPoint2, Point2D aPoint1) + { + return new Point2D(aPoint2.X + aPoint1.X, aPoint2.Z + aPoint1.Z); + } } \ No newline at end of file