14#include "./primitive.h"
16#include "./covarianceFit.h"
18#include <Eigen/Eigenvalues>
33template <
class DataPo
int,
class _NFilter,
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)
73 bool _isPositionVector = true) const;
84 bool _isPositionVector = true) const;
89 template < class DataPoint, class _NFilter, typename T>
94 Plane<DataPoint, _NFilter, T>>>>;
103template < class DataPoint, class _NFilter,
int DiffType, typename T>
106 PONCA_FITTING_DECLARE_DEFAULT_TYPES
107 PONCA_FITTING_DECLARE_MATRIX_TYPE
108 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
109 static_assert ( DataPoint::Dim == 3,
"CovariancePlaneDer is only valid in 3D");
114 Check = Base::PROVIDES_PLANE &
115 Base::PROVIDES_POSITION_COVARIANCE_DERIVATIVE,
117 PROVIDES_NORMAL_DERIVATIVE
121 VectorArray m_dNormal {VectorArray::Zero()};
122 ScalarArray m_dDist {ScalarArray::Zero()};
145template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
151#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.
ScalarArray dPotential() const
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
@ PROVIDES_COVARIANCE_PLANE_DERIVATIVE
Provides derivatives for hyper-planes.
VectorArray dNormal() const
Returns the derivatives of the primitive normal.
Plane fitting procedure using only points position.
VectorType tangentPlaneToWorld(const VectorType &_q, bool _isPositionVector=true) const
Transform a point from the tangent plane [h, u, v]^T to ambient space.
FIT_RESULT finalize()
Finalize the procedure.
CovariancePlaneFitImpl< DataPoint, _NFilter, T > & covariancePlaneFit()
Explicit conversion to CovariancePlaneFitImpl , to access methods potentially hidden by heritage.
VectorType worldToTangentPlane(const VectorType &_q, bool _isPositionVector=true) const
Express a point in ambient space relatively to the tangent plane.
@ PROVIDES_TANGENT_PLANE_BASIS
Expose a method worldToTangentPlane(VectorType), which turns a point in ambient 3D space to the tange...
typename Base::VectorType VectorType
Alias to vector type.
Compute the derivatives of the input points barycenter.
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)