#include <point2d.h>
Public Member Functions | |
double | angle () const |
const cv::Point_< double > & | cv () const |
cv::Point_< double > & | cv () |
double | distanceTo (const Point2D &p) const |
bool | equal (const Point2D &o, double tolerance=0.0001) const |
double | get_h () const |
double | get_x () const |
double | get_y () const |
const double & | h () const |
double & | h () |
bool | inside (double x0, double y0, double x1, double y1) const |
Point2D () | |
Point2D (const Point2D &p) | |
Point2D (const cv::Point &p) | |
Point2D (double x, double y) | |
Point2D (double x, double y, double h) | |
Point2D (const Polar2D &p) | |
template<typename T > | |
Point2D (const cv::Vec< T, 3 > &p) | |
template<typename T > | |
Point2D (const cv::Vec< T, 2 > &p) | |
template<typename T > | |
Point2D (const cv::Point_< T > &p) | |
double | radius () const |
Point2D & | set (double x, double y) |
Point2D & | set (double x, double y, double h) |
void | set_h (double v) |
void | set_x (double v) |
void | set_y (double v) |
std::string | str (const char *format="[%6.4lf, %6.4lf, %6.5lf]") const |
cv::Vec< double, 2 > | vector () const |
const double & | x () const |
double & | x () |
const double & | y () const |
double & | y () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Point2D &o) |
class to represent a point using homogeneous coordinates [x, y, 1]
Point2D::Point2D | ( | ) |
constructor
Definition at line 5 of file point2d.cpp.
Point2D::Point2D | ( | const Point2D & | p | ) |
Point2D::Point2D | ( | const cv::Point & | p | ) |
Point2D::Point2D | ( | double | x, |
double | y | ||
) |
Point2D::Point2D | ( | double | x, |
double | y, | ||
double | h | ||
) |
Point2D::Point2D | ( | const Polar2D & | p | ) |
|
inline |
|
inline |
|
inline |
double Point2D::angle | ( | ) | const |
angle form origin to point (alpha in polar space)
Definition at line 151 of file point2d.cpp.
const cv::Point_< double > & Point2D::cv | ( | ) | const |
cv::Point_< double > & Point2D::cv | ( | ) |
double Point2D::distanceTo | ( | const Point2D & | p | ) | const |
bool Point2D::equal | ( | const Point2D & | o, |
double | tolerance = 0.0001 |
||
) | const |
double Point2D::get_h | ( | ) | const |
double Point2D::get_x | ( | ) | const |
double Point2D::get_y | ( | ) | const |
const double & Point2D::h | ( | ) | const |
double & Point2D::h | ( | ) |
bool Point2D::inside | ( | double | x0, |
double | y0, | ||
double | x1, | ||
double | y1 | ||
) | const |
checks if a point is within a rectangle
x0 | top left x |
y0 | top left y |
x1 | bottom right x |
y1 | bottom right y |
Definition at line 171 of file point2d.cpp.
double Point2D::radius | ( | ) | const |
Point2D & Point2D::set | ( | double | x, |
double | y | ||
) |
Point2D & Point2D::set | ( | double | x, |
double | y, | ||
double | h | ||
) |
void Point2D::set_h | ( | double | v | ) |
void Point2D::set_x | ( | double | v | ) |
void Point2D::set_y | ( | double | v | ) |
std::string Point2D::str | ( | const char * | format = "[%6.4lf, %6.4lf, %6.5lf]" | ) | const |
returns x and y as formated string
format | using printf format |
Definition at line 180 of file point2d.cpp.
cv::Vec< double, 2 > Point2D::vector | ( | ) | const |
vector without homogeneous component
Definition at line 120 of file point2d.cpp.
const double & Point2D::x | ( | ) | const |
translational x component
translational x component
Definition at line 35 of file point2d.cpp.
double & Point2D::x | ( | ) |
translational x component
translational x component
Definition at line 42 of file point2d.cpp.
const double & Point2D::y | ( | ) | const |
double & Point2D::y | ( | ) |
|
friend |