]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomDataAPI/GeomDataAPI_Point2D.h
Salome HOME
#refs 156 - Behavior of the Sketch during edition
[modules/shaper.git] / src / GeomDataAPI / GeomDataAPI_Point2D.h
index 02249c24f69edd0e2f484df23dfea1111457dcb8..c0eb001cfbbafe1a24dae931ac524364ca01b32e 100644 (file)
@@ -17,7 +17,7 @@ class GeomAPI_Pnt2d;
 
 class GeomDataAPI_Point2D : public ModelAPI_Attribute
 {
-public:
+ public:
   /// Defines the double value
   virtual void setValue(const double theX, const double theY) = 0;
   /// Defines the point
@@ -30,16 +30,30 @@ public:
   /// Returns the 2D point
   virtual boost::shared_ptr<GeomAPI_Pnt2d> pnt() = 0;
 
+  /// Appends the delta values to point
+  void move(const double theDeltaX, const double theDeltaY)
+  {
+    setValue(x() + theDeltaX, y() + theDeltaY);
+  }
+
+
   /// Returns the type of this class of attributes
-  static inline std::string type() {return std::string("Point2D");}
+  static inline std::string type()
+  {
+    return std::string("Point2D");
+  }
 
   /// Returns the type of this class of attributes, not static method
-  virtual std::string attributeType() {return type();}
+  virtual std::string attributeType()
+  {
+    return type();
+  }
 
-protected:
+ protected:
   /// Objects are created for features automatically
   GeomDataAPI_Point2D()
-  {}
+  {
+  }
 };
 
 #endif