00001 00012 class OVPoint : public OGraphic 00013 { 00014 protected: 00015 double x; 00016 double y; 00017 00018 public: 00019 inline OGraphic* clone() const; 00020 inline OGraphic* create() const; 00021 00022 OVPoint(); 00023 OVPoint(double,double); 00024 ~OVPoint(); 00025 00026 double euclid(OVPoint &); 00027 void move(double,double); 00028 void scalar(double); 00029 bool isValid(); 00030 OPoint getOPoint(); 00031 00032 bool operator == (OVPoint &); 00033 bool operator != (OVPoint &); 00034 OVPoint operator + (OVPoint &); 00035 OVPoint operator - (OVPoint &); 00036 OVPoint operator / (int); 00037 OVPoint operator * (int); 00038 00039 void gomo(ostream &); 00040 void gomi(istream &); 00041 void xmlo(ostream &); 00042 void svgo(ostream &); 00043 00044 inline void clear(); 00045 inline void set(double,double); 00046 inline void setX(double); 00047 inline void setY(double); 00048 inline double getX(); 00049 inline double getY(); 00050 inline double getDX(OVPoint &); 00051 inline double getDY(OVPoint &); 00052 }; 00053 00054 inline OGraphic* OVPoint::clone() const 00055 { return new OVPoint(*this); } 00056 inline OGraphic* OVPoint::create() const 00057 { return new OVPoint(); } 00058 00059 inline void OVPoint::clear() 00060 { this->x = -1; this->y = -1; } 00061 inline void OVPoint::set(double x,double y) 00062 { this->x = x; this->y = y; } 00063 inline void OVPoint::setX(double x) 00064 { this->x = x;} 00065 inline void OVPoint::setY(double y) 00066 { this->y = y;} 00067 inline double OVPoint::getX() 00068 {return x;} 00069 inline double OVPoint::getY() 00070 {return y;} 00071 inline double OVPoint::getDX(OVPoint & p) 00072 {return p.getX()-x;} 00073 inline double OVPoint::getDY(OVPoint & p) 00074 {return p.getY()-y;}