14#include "./primitive.h"
16#include "./covarianceFit.h"
18#include <Eigen/Eigenvalues>
33 template <
class DataPo
int,
class _NFilter,
typename T>
36 PONCA_FITTING_DECLARE_DEFAULT_TYPES
37 PONCA_FITTING_DECLARE_MATRIX_TYPE
42 Check = Base::PROVIDES_PLANE && Base::PROVIDES_POSITION_COVARIANCE,
54 PONCA_FITTING_DECLARE_FINALIZE
55 PONCA_FITTING_IS_SIGNED(
false)
72 bool _isPositionVector = true) const;
83 bool _isPositionVector = true) const;
88 template <class DataPoint, class _NFilter, typename T>
100 template <class DataPoint, class _NFilter,
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 & Base::PROVIDES_POSITION_COVARIANCE_DERIVATIVE,
113 PROVIDES_NORMAL_DERIVATIVE
117 VectorArray m_dNormal{VectorArray::Zero()};
118 ScalarArray m_dDist{ScalarArray::Zero()};
140 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
145#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 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)