Class Point2D
Defined in File point2d.hpp
Inheritance Relationships
Base Type
public cv::Vec< double, 3 >
Derived Type
public tuw::Polar2D
(Class Polar2D)
Class Documentation
-
class Point2D : public cv::Vec<double, 3>
class to represent a point using homogeneous coordinates [x, y, 1]
Subclassed by tuw::Polar2D
Public Functions
-
Point2D()
constructor
-
Point2D(double x, double y)
constructor
- Parameters:
x –
y –
-
Point2D(double x, double y, double h)
constructor
- Parameters:
x –
y –
h –
-
const double &x() const
translational x component
translational x component
- Returns:
x component
- Returns:
rotation
-
double &x()
translational x component
translational x component
- Returns:
x component
- Returns:
rotation
-
const double &y() const
translational y component
- Returns:
y component
-
double &y()
translational y component
- Returns:
y component
-
const double &h() const
homogeneous component
- Returns:
rotation
-
double &h()
homogeneous component
- Returns:
rotation
-
void set_x(double v)
set funktion for x
- Parameters:
x – component
-
double get_x() const
get function for x
- Returns:
x component
-
void set_y(double v)
set funktion for y
- Parameters:
y – component
-
double get_y() const
get function for y
- Returns:
y component
-
void set_h(double v)
set funktion for h
- Parameters:
h – component
-
double get_h() const
get function for h
- Returns:
h component
-
double angle() const
angle form origin to point (alpha in polar space)
See also
See also
- Returns:
angle between -PI and +PI
-
double radius() const
distance to origin (rho in polar space)
See also
See also
- Returns:
distance
-
double distanceTo(const Point2D &p) const
returns the distance to an other point
returns the distance to an other point
- Parameters:
p –
- Returns:
disance
- Returns:
disance
-
double distanceTo(double x, double y) const
returns the distance to an other point
returns the distance to an other point
- Parameters:
x –
y –
- Returns:
disance
- Returns:
disance
-
cv::Point &to(cv::Point &des) const
copy to cv::Point
- Parameters:
des –
- Returns:
cv::Point to des reference
-
cv::Point &to(cv::Point &des)
copy to cv::Point
- Parameters:
des –
- Returns:
cv::Point to des reference
-
bool inside(double x0, double y0, double x1, double y1) const
checks if a point is within a rectangle
- Parameters:
x0 – top left x
y0 – top left y
x1 – bottom right x
y1 – bottom right y
- Returns:
true if inside
-
std::string str(const char *format = "[%6.4lf, %6.4lf, %6.5lf]") const
returns x and y as formated string
- Parameters:
format – using printf format
- Returns:
string
-
Point2D()