18 this->val[0] =
x, this->val[1] =
y;
28 this->val[0] =
x, this->val[1] =
y, this->val[2] =
h;
121 return cv::Vec< double, 2 > ( this->
x(), this->
y() );
128 double dx = p.val[0] - this->val[0], dy = p.val[1] - this->val[1];
129 return sqrt ( dx*dx+dy*dy );
136 return ( cv::Point_<double> & ) *
this;
143 return ( cv::Point_<double> & ) *
this;
152 return atan2 ( this->val[1], this->val[0] );
161 return sqrt ( this->val[0]*this->val[0] + this->val[1]*this->val[1] );
172 return ( (
x() >= x0 ) && (
x() <= x1 ) && (
y() >= y0 ) && (
y() <= y1 ) );
183 sprintf(str,format,
x(),
y());
184 return std::string(str);
193 double d = cv::norm(o - *
this);
194 return d < tolerance;
bool inside(double x0, double y0, double x1, double y1) const
cv::Vec< double, 2 > vector() const
bool equal(const Point2D &o, double tolerance=0.0001) const
double distanceTo(const Point2D &p) const
std::string str(const char *format="[%6.4lf, %6.4lf, %6.5lf]") const
std::string format(const cv::Mat_< int8_t > &m)
Point2D & set(double x, double y)
const cv::Point_< double > & cv() const