9#include "../../defines.h"
10#include "../concepts.h"
12#define FUNDAMENTAL_FORM_WEINGARTEN_ESTIMATOR_REQUIREMENTS \
13 ProvidesFirstFondamentalFormComponents<T>&& ProvidesSecondFondamentalFormComponents<T>&& Is3D<DataPoint>
14#define NORMAL_DERIVATIVE_WEINGARTEN_ESTIMATOR_REQUIREMENTS Is3D<DataPoint>&& ProvidesSpaceDerivative<T>
15#define WIENGARTEN_CURVATURE_ESTIMATOR_REQUIREMENTS \
16 ProvidesTangentPlaneBasis<T>&& ProvidesWeingartenMap<T>&& Is3D<DataPoint>
39 template <
class DataPo
int,
class _NFilter,
typename T>
40 requires FUNDAMENTAL_FORM_WEINGARTEN_ESTIMATOR_REQUIREMENTS
43 PONCA_FITTING_DECLARE_DEFAULT_TYPES
44 using Matrix2 = Eigen::Matrix<Scalar, 2, 2>;
59 template <typename Matrix2Derived>
70 template <typename Matrix2Derived>
77 PONCA_MULTIARCH [[nodiscard]] inline Matrix2
weingartenMap() const;
81 template <typename Matrix2Derived>
82 PONCA_MULTIARCH inline
void weingartenMap(Matrix2Derived& w) const;
108 template <class DataPoint, class _NFilter,
int DiffType, typename T>
109 requires NORMAL_DERIVATIVE_WEINGARTEN_ESTIMATOR_REQUIREMENTS
112 PONCA_FITTING_DECLARE_DEFAULT_TYPES
113 PONCA_FITTING_DECLARE_MATRIX_TYPE
114 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
115 using Matrix2 = Eigen::Matrix<Scalar, 2, 2>;
118 MatrixType m_tangentBasis{MatrixType::Zero()};
122 normalDerivativeWeingartenEstimator)
124 PONCA_FITTING_DECLARE_FINALIZE
130 PONCA_MULTIARCH [[nodiscard]] inline Matrix2
weingartenMap() const;
134 template <typename Matrix2Derived>
135 PONCA_MULTIARCH inline
void weingartenMap(Matrix2Derived& w) const;
139 bool _isPositionVector = true) const;
143 bool _isPositionVector = true) const;
165 template <
class DataPo
int,
class _NFilter,
typename T>
166 requires WIENGARTEN_CURVATURE_ESTIMATOR_REQUIREMENTS
169 PONCA_FITTING_DECLARE_DEFAULT_TYPES
170 using Matrix2 = Eigen::Matrix<Scalar, 2, 2>;
173 Eigen::SelfAdjointEigenSolver<Matrix2> m_solver;
176 PONCA_FITTING_DECLARE_FINALIZE
179 PONCA_MULTIARCH [[nodiscard]]
inline Scalar kmin()
const {
return m_solver.eigenvalues().x(); }
182 PONCA_MULTIARCH [[nodiscard]]
inline Scalar kmax()
const {
return m_solver.eigenvalues().y(); }
189 vmin.template bottomRows<2>() = m_solver.eigenvectors().col(0);
190 vmin = Base::tangentPlaneToWorld(vmin,
false);
199 vmax.template bottomRows<2>() = m_solver.eigenvectors().col(1);
200 vmax = Base::tangentPlaneToWorld(vmax,
false);
205 PONCA_MULTIARCH [[nodiscard]]
inline Scalar kMean()
const {
return (kmin() + kmax()) /
Scalar(2); }
213 template <
class DataPo
int,
class _NFilter,
typename T>
216 PONCA_FITTING_DECLARE_DEFAULT_TYPES
222 template <class DataPoint, class _NFilter,
int DiffType, typename T>
225 PONCA_FITTING_DECLARE_DEFAULT_TYPES
226 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
233#include "weingarten.hpp"
Compute a Weingarten map from the spatial derivatives of the normal field .
typename Base::VectorType VectorType
Alias to vector type.
typename DataPoint::MatrixType MatrixType
Alias to matrix type.
Compute principal curvatures from a base class providing fundamental forms.
Scalar GaussianCurvature() const
Returns an estimate of the Gaussian curvature.
typename Base::VectorType VectorType
Alias to vector type.
Scalar kmax() const
Returns an estimate of the maximal principal curvature value.
Scalar kmin() const
Returns an estimate of the minimal principal curvature value.
VectorType kmaxDirection() const
Returns an estimate of the maximal principal curvature direction.
Scalar kMean() const
Returns an estimate of the mean curvature.
typename DataPoint::Scalar Scalar
Alias to scalar type.
VectorType kminDirection() const
Returns an estimate of the minimal principal curvature direction.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
DiffType
Flags defining which derivatives need to be computed.
Compute principal curvatures from a base class providing fundamental forms.
Compute principal curvatures from a base class providing fundamental forms.