26 #ifndef __QUADRIC3D_HH__
27 #define __QUADRIC3D_HH__
28 #include "bias_config.h"
30 #include <Base/Debug/Error.hh>
31 #include <Base/Debug/Debug.hh>
32 #include <Base/Math/Matrix4x4.hh>
33 #include <Base/Geometry/HomgPoint3D.hh>
34 #include <Geometry/CovMatrix3x3.hh>
36 #define QUADRIC3D_TYPE double
39 #define GAUSS3D_CONFIDENCE_20_PERCENT 1.00
40 #define GAUSS3D_CONFIDENCE_39_PERCENT 1.36
41 #define GAUSS3D_CONFIDENCE_50_PERCENT 1.54
42 #define GAUSS3D_CONFIDENCE_68_PERCENT 1.88
43 #define GAUSS3D_CONFIDENCE_90_PERCENT 2.50
44 #define GAUSS3D_CONFIDENCE_95_PERCENT 2.79
45 #define GAUSS3D_CONFIDENCE_99_PERCENT 3.37
127 const double& dScale = GAUSS3D_CONFIDENCE_20_PERCENT);
138 return ( point3D *((*
this)*point3D) ); }
142 double d = (*this)[0][0]+(*this)[1][1]+(*this)[2][2];
143 if (fabs(d)<DBL_EPSILON)
return false;
144 (*this) /= d;
return true; }
153 Quadric3D GetDualQuadric(
bool UseSVD =
false)
const;
158 unsigned int GetSignature();
MatrixInitType
can be passed to matrix constructors to init the matrix with the most often used values ...
A quadric as a 4x4 matrix describing a surface in 3d projective space defined by a quadratic equation...
Quadric3D & operator=(const Matrix< QUADRIC3D_TYPE > &M)
Quadric3D(const MatrixInitType &i)
set default matrix values
class for 3x3 covariance matrices
double LocatePoint(const HomgPoint3D &point3D) const
determines if point3D is inside/on/outside the surface
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
is a 'fixed size' quadratic matrix of dim.
Matrix4x4 & operator=(const Matrix< T > &mat)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate ...
bool Normalize()
sets trace of upperleft submatrix3x3 to unity
Quadric3D(const Matrix< QUADRIC3D_TYPE > &M)