40 #include <visp3/core/vpMath.h>
79 this->rDist = scanpoint.rDist;
80 this->hAngle = scanpoint.hAngle;
81 this->vAngle = scanpoint.vAngle;
89 inline vpScanPoint(
double r_dist,
double h_angle,
double v_angle)
90 : rDist(r_dist), hAngle(h_angle), vAngle(v_angle)
93 this->hAngle = h_angle;
94 this->vAngle = v_angle;
104 inline void setPolar(
double r_dist,
double h_angle,
double v_angle) {
105 this->rDist = r_dist;
106 this->hAngle = h_angle;
107 this->vAngle = v_angle;
113 return ( this->rDist );
119 return ( this->vAngle );
125 return ( this->hAngle );
135 return ( rDist * cos(this->hAngle) * cos(this->vAngle) );
145 return ( rDist * sin(this->hAngle) );
154 return ( rDist * cos(this->hAngle) * sin(this->vAngle) );
176 return ( ( std::fabs(rd1 - rd2) <= std::fabs(
vpMath::maximum(rd1,rd2)) * std::numeric_limits<double>::epsilon() )
178 ( std::fabs(ha1 - ha2) <= std::fabs(
vpMath::maximum(ha1,ha2)) * std::numeric_limits<double>::epsilon() )
180 ( std::fabs(va1 - va2) <= std::fabs(
vpMath::maximum(va1,va2)) * std::numeric_limits<double>::epsilon() ) );
199 return ( ( std::fabs(rd1 - rd2) > std::fabs(
vpMath::maximum(rd1,rd2)) * std::numeric_limits<double>::epsilon() )
201 ( std::fabs(ha1 - ha2) <= std::fabs(
vpMath::maximum(ha1,ha2)) * std::numeric_limits<double>::epsilon() )
203 ( std::fabs(va1 - va2) <= std::fabs(
vpMath::maximum(va1,va2)) * std::numeric_limits<double>::epsilon() ) );
249 std::ios_base::fmtflags original_flags = s.flags();
258 s.setf(original_flags);
vpScanPoint(const vpScanPoint &scanpoint)
vpScanPoint(double r_dist, double h_angle, double v_angle)
static Type maximum(const Type &a, const Type &b)
Class that defines a single laser scanner point.
double getRadialDist() const
friend bool operator==(const vpScanPoint &sp1, const vpScanPoint &sp2)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
friend std::ostream & operator<<(std::ostream &s, const vpScanPoint &p)
void setPolar(double r_dist, double h_angle, double v_angle)
friend bool operator!=(const vpScanPoint &sp1, const vpScanPoint &sp2)