13#include "./primitive.h"
15#include "./covarianceFit.h"
17#include <Eigen/Eigenvalues>
32template <
class DataPo
int,
class _WFunctor,
typename T >
35PONCA_FITTING_DECLARE_DEFAULT_TYPES
36PONCA_FITTING_DECLARE_MATRIX_TYPE
41 Check = Base::PROVIDES_PLANE &&
42 Base::PROVIDES_POSITION_COVARIANCE,
54 PONCA_FITTING_DECLARE_FINALIZE
55 PONCA_FITTING_IS_SIGNED(
false)
70 template <
bool ignoreTranslation = false>
80 template <
bool ignoreTranslation = false>
86 template < class DataPoint, class _WFunctor, typename T>
91 Plane<DataPoint, _WFunctor,T>>>>;
100template < class DataPoint, class _WFunctor,
int DiffType, typename T>
103 PONCA_FITTING_DECLARE_DEFAULT_TYPES
104 PONCA_FITTING_DECLARE_MATRIX_TYPE
105 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
106 static_assert ( DataPoint::Dim == 3,
"CovariancePlaneDer is only valid in 3D");
111 Check = Base::PROVIDES_PLANE &
112 Base::PROVIDES_POSITION_COVARIANCE_DERIVATIVE,
114 PROVIDES_NORMAL_DERIVATIVE
118 VectorArray m_dNormal {VectorArray::Zero()};
119 ScalarArray m_dDist {ScalarArray::Zero()};
142template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
148#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)