34 #ifndef _vpImagePoint_h_
35 #define _vpImagePoint_h_
43 #include <visp3/core/vpConfig.h>
114 inline double get_i()
const {
return i; }
125 inline double get_j()
const {
return j; }
136 inline double get_u()
const {
return j; }
147 inline double get_v()
const {
return i; }
149 bool inRectangle(
const vpRect &rect)
const;
218 if (fabs(end.
get_j() - this->j) > fabs(end.
get_i() - this->i)) {
219 double j_ = (end.
get_j() > this->j ? this->j + 1 : this->j - 1);
220 #if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
221 return {end.
get_i() - line_slope * (end.
get_j() - j_), j_};
226 double i_ = (end.
get_i() > this->i ? this->i + 1 : this->i - 1);
227 #if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
228 return {i_, end.
get_j() - ((end.
get_i() - i_) / line_slope)};
244 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
291 inline void set_i(
double ii) { this->i = ii; }
302 inline void set_j(
double jj) { this->j = jj; }
328 inline void set_u(
double u) { j = u; }
339 inline void set_v(
double v) { i = v; }
357 static vpRect getBBox(
const std::vector<vpImagePoint> &ipVec);
373 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpImagePoint &ip);
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
vpImagePoint & operator=(const vpImagePoint &&ip) noexcept
vpImagePoint(double ii, double jj)
vpImagePoint & operator=(const vpImagePoint &ip)
void set_ij(double ii, double jj)
virtual ~vpImagePoint()
Destructor.
vpImagePoint nextInSegment(const vpImagePoint &start, const vpImagePoint &end) const
void set_uv(double u, double v)
vpImagePoint & operator*=(double scale)
vpImagePoint(const vpImagePoint &ip)
vpImagePoint & operator-=(const vpImagePoint &ip)
bool inSegment(const vpImagePoint &start, const vpImagePoint &end) const
Defines a rectangle in the plane.
vpColVector operator*(const double &x, const vpColVector &v)