8#include "../../defines.h"
9#include "../concepts.h"
11#include "../extensions/heightField.h"
12#include "../extensions/weingarten.h"
15#include PONCA_MULTIARCH_INCLUDE_STD(cmath)
19#define MONGE_PATCH_REQUIREMENTS ProvidesTangentPlaneBasis<T>&& ProvidesHeightField<T>&& Is3D<DataPoint>
20#define MONGE_PATCH_FIT_REQUIREMENTS ProvidesImplicitPrimitive<T>&& ProvidesMongePatch<T>
40 template <
class DataPo
int,
class _NFilter,
typename T>
41 requires MONGE_PATCH_REQUIREMENTS
44 PONCA_FITTING_DECLARE_DEFAULT_TYPES
62 return Base::height(Base::getUFromLocalCoordinates(x), Base::getVFromLocalCoordinates(x)) -
63 Base::getHFromLocalCoordinates(x);
72 Base::getHFromLocalCoordinates(x) =
73 Base::height(Base::getUFromLocalCoordinates(x), Base::getVFromLocalCoordinates(x));
74 return Base::tangentPlaneToWorld(x);
97 return Base::heightTangentULocal(
_localQ).cross(Base::heightTangentVLocal(
_localQ));
100 PONCA_MULTIARCH
inline void firstFundamentalFormComponents(Scalar&
E, Scalar&
F, Scalar&
G)
const
102 PONCA_MULTIARCH_STD_MATH(
sqrt);
104 const VectorType fv{Base::dh_dv(),
Scalar(0),
Scalar(1)};
110 PONCA_MULTIARCH
inline void secondFundamentalFormComponents(Scalar& L, Scalar& M, Scalar& N)
const
112 PONCA_MULTIARCH_STD_MATH(sqrt);
113 const VectorType fuu{Base::d2h_duu(),
Scalar(0),
Scalar(0)};
114 const VectorType fuv{Base::d2h_duv(),
Scalar(0),
Scalar(0)};
115 const VectorType fvv{Base::d2h_dvv(),
Scalar(0),
Scalar(0)};
134 template <
class DataPo
int,
class _NFilter,
typename T>
135 requires MONGE_PATCH_FIT_REQUIREMENTS
138 PONCA_FITTING_DECLARE_MULTIPASS_TYPES
141 using SampleMatrix = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
142 using QuadraticHeightFieldCoefficients =
typename Base::HeightFieldCoefficients;
147 QuadraticHeightFieldCoefficients
m_b{QuadraticHeightFieldCoefficients::Zero()};
150 PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE
160 template <
class DataPo
int,
class _NFilter,
typename T>
161 requires MONGE_PATCH_FIT_REQUIREMENTS
164 PONCA_FITTING_DECLARE_MULTIPASS_TYPES
167 using SampleMatrix = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
168 using QuadraticHeightFieldCoefficients =
typename Base::HeightFieldCoefficients;
172 QuadraticHeightFieldCoefficients
m_b{QuadraticHeightFieldCoefficients::Zero()};
175 PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE
178 template <
class DataPo
int,
class _NFilter,
typename T>
190 template <
class DataPo
int,
class _NFilter,
typename T>
202#include "mongePatch.hpp"
Aggregator class used to declare specialized structures using CRTP.
Extension to compute the best fit quadric on 3d points expressed as .
MongePatchQuadraticFitImpl< DataPoint, _NFilter, T > & mongePatchQuadraticFit()
Explicit conversion to MongePatchQuadraticFitImpl , to access methods potentially hidden by heritage.
SampleMatrix m_A
Quadric input samples.
QuadraticHeightFieldCoefficients m_b
Observations.
Extension to compute the best fit restricted quadric on 3d points expressed as .
MongePatchRestrictedQuadraticFitImpl< DataPoint, _NFilter, T > & mongePatchQuadraticFit()
Explicit conversion to MongePatchRestrictedQuadraticFitImpl , to access methods potentially hidden by...
QuadraticHeightFieldCoefficients m_b
Observations.
SampleMatrix m_A
Quadric input samples.
Monge Patch primitive, defined as , with defined by a Base class.
typename Base::VectorType VectorType
Alias to vector type.
typename DataPoint::Scalar Scalar
Alias to scalar type.
Scalar potential(const VectorType &_q) const
Value of the scalar field at a given point.
VectorType primitiveGradient(const VectorType &_q) const
Scalar field gradient direction at .
VectorType primitiveGradient() const
Scalar field gradient direction at the basis center.
MongePatch< DataPoint, _NFilter, T > & mongePatchPrimitive()
Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
VectorType primitiveGradientLocal(const VectorType &_localQ=VectorType::Zero()) const
Scalar field gradient direction, both input and output vectors are expressed in the local basis.
VectorType project(const VectorType &_q) const
Orthogonal projection on the patch.
MongePatch()
Default constructor.
MongePatch< DataPoint, _NFilter, T > & secondFondamentalFormComponent()
Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
MongePatch< DataPoint, _NFilter, T > & firstFondamentalFormComponent()
Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
Scalar potential() const
Value of the scalar field at the evaluation point.
T Base
Base class of the procedure.
MongePatch< DataPoint, _NFilter, T > & implicitPrimitive()
Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
Helper class to check for status of required extensions.
Quadratic height field defined as .
Quadratic height field defined as .
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Compute principal curvatures from a base class providing fundamental forms.