26 #ifndef __HOMGLINE3D_HH__
27 #define __HOMGLINE3D_HH__
28 #include "bias_config.h"
30 #include "HomgPoint3D.hh"
32 #define HOMGLINE3D_TYPE double
33 #define HOMGLINE3D_EPS 1e-12
53 {
return PointInf_; };
56 {
return PointFin_; };
60 inline void Homogenize();
64 inline void Distance(
HomgPoint3D& p, HOMGLINE3D_TYPE& dist);
76 : PointInf_(p1), PointFin_(p2)
133 BIASASSERT(p.
GetW() !=0.0);
140 tmp[0] = p[0] / p.
GetW();
141 tmp[1] = p[1] / p.
GetW();
142 tmp[2] = p[2] / p.
GetW();
165 #endif // __HOMGLINE3D_HH__
a homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and ...
void ScalarProduct(const Vector3< T > &argvec, T &result) const
scalar product (=inner product) of two vectors, storing the result in result
void Homogenize()
homogenize class data member elements to W==1 by divison by W
double NormL2() const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2)
HOMGPOINT3D_TYPE GetW() const
void CalculateFootpoint(HomgPoint3D &p, HomgPoint3D &footp)
void Distance(HomgPoint3D &p, HOMGLINE3D_TYPE &dist)
HomgPoint3D GetPointFin() const
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
void SubIP(const T &scalar)
Substraction (in place) of an scalar.
HomgPoint3D GetPointInf() const
void Set(const HomgPoint3D &p1, const HomgPoint3D &p2)