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
/// 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