14#include "./primitive.h"
16#include "./covarianceFit.h"
18#include <Eigen/Eigenvalues>
33template <
class DataPo
int,
class _WFunctor,
typename T >
36PONCA_FITTING_DECLARE_DEFAULT_TYPES
37PONCA_FITTING_DECLARE_MATRIX_TYPE
42 Check = Base::PROVIDES_PLANE &&
43 Base::PROVIDES_POSITION_COVARIANCE,
55 PONCA_FITTING_DECLARE_FINALIZE
56 PONCA_FITTING_IS_SIGNED(
false)
71 template <
bool ignoreTranslation = false>
81 template <
bool ignoreTranslation = false>
87 template < class DataPoint, class _WFunctor, typename T>
92 Plane<DataPoint, _WFunctor,T>>>>;
101template < class DataPoint, class _WFunctor,
int DiffType, typename T>
104 PONCA_FITTING_DECLARE_DEFAULT_TYPES
105 PONCA_FITTING_DECLARE_MATRIX_TYPE
106 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
107 static_assert ( DataPoint::Dim == 3,
"CovariancePlaneDer is only valid in 3D");
112 Check = Base::PROVIDES_PLANE &
113 Base::PROVIDES_POSITION_COVARIANCE_DERIVATIVE,
115 PROVIDES_NORMAL_DERIVATIVE
119 VectorArray m_dNormal {VectorArray::Zero()};
120 ScalarArray m_dDist {ScalarArray::Zero()};
143template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
149#include "covariancePlaneFit.hpp"
Procedure that compute and decompose the covariance matrix of the neighbors positions in .
Internal generic class computing the derivatives of covariance matrix computed by CovarianceFitBase.
[CovariancePlaneFit Definition]
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
@ PROVIDES_COVARIANCE_PLANE_DERIVATIVE
Provides derivatives for hyper-planes.
VectorArray dNormal() const
Returns the derivatives of the primitive normal.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
ScalarArray dPotential() const
Plane fitting procedure using only points position.
FIT_RESULT finalize()
Finalize the procedure.
CovariancePlaneFitImpl< DataPoint, _WFunctor, T > & covariancePlaneFit()
Explicit conversion to CovariancePlaneFitImpl , to access methods potentially hidden by heritage.
@ PROVIDES_TANGENT_PLANE_BASIS
Expose a method worldToTangentPlane(VectorType), which turns a point in ambient 3D space to the tange...
VectorType worldToTangentPlane(const VectorType &_q) const
Express a point in ambient space relatively to the tangent plane.
VectorType tangentPlaneToWorld(const VectorType &_q) const
Transform a point from the tangent plane [h, u, v]^T to ambient space.
typename Base::VectorType VectorType
Alias to vector type.
Compute the barycenter of the input points.
Implicit hyperplane defined by an homogeneous vector .
This Source Code Form is subject to the terms of the Mozilla Public License, v.
DiffType
Flags defining which derivatives need to be computed.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)