41 #ifndef vpImagePoint_H
42 #define vpImagePoint_H
50 #include <visp3/core/vpConfig.h>
121 inline double get_i()
const {
return i; }
132 inline double get_j()
const {
return j; }
143 inline double get_u()
const {
return j; }
154 inline double get_v()
const {
return i; }
156 bool inRectangle(
const vpRect &rect)
const;
225 if (fabs(end.
get_j() - this->j) > fabs(end.
get_i() - this->i)) {
226 double j = (end.
get_j() > this->j ? this->j + 1 : this->j - 1);
227 #if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
228 return {end.
get_i() - line_slope * (end.
get_j() - j), j};
233 double i = (end.
get_i() > this->i ? this->i + 1 : this->i - 1);
234 #if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
235 return {i, end.
get_j() - ((end.
get_i() - i) / line_slope)};
251 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
298 inline void set_i(
double ii) { this->i = ii; }
309 inline void set_j(
double jj) { this->j = jj; }
335 inline void set_u(
double u) { j = u; }
346 inline void set_v(
double v) { i = v; }
364 static vpRect getBBox(
const std::vector<vpImagePoint> &ipVec);
380 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)