26template <
class DataPo
int,
class _WFunctor,
typename T>
29PONCA_FITTING_DECLARE_DEFAULT_TYPES
32 enum { Check = Base::PROVIDES_PLANE && Base::PROVIDES_TANGENT_PLANE_BASIS };
35 using SampleMatrix = Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>;
36 using Vector6 = Eigen::Matrix<Scalar,6,1>;
40 Vector6
m_x {Vector6::Zero()};
41 Vector6
m_b {Vector6::Zero()};
43 bool m_planeIsReady {
false};
46 PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE
55 return h_uu()*u*u + h_vv()*v*v + h_uv()*u*v + h_u()*u + h_v()*v + h_c();
62 return evalUV(*(x.data()+1),*(x.data()+2)) - *(x.data());
69 *(x.data()) = evalUV(*(x.data()+1),*(x.data()+2));
70 return Base::tangentPlaneToWorld(x);
73 PONCA_MULTIARCH
inline const Scalar & h_uu ()
const {
return *(
m_x.data()); }
74 PONCA_MULTIARCH
inline const Scalar & h_vv ()
const {
return *(
m_x.data()+1); }
75 PONCA_MULTIARCH
inline const Scalar & h_uv ()
const {
return *(
m_x.data()+2); }
76 PONCA_MULTIARCH
inline const Scalar & h_u ()
const {
return *(
m_x.data()+3); }
77 PONCA_MULTIARCH
inline const Scalar & h_v ()
const {
return *(
m_x.data()+4); }
78 PONCA_MULTIARCH
inline const Scalar & h_c ()
const {
return *(
m_x.data()+5); }
82#include "mongePatch.hpp"
Extension to compute the best fit quadric on 3d points expressed as .
MongePatch< DataPoint, _WFunctor, T > & mongePatch()
Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
typename Base::VectorType VectorType
Alias to vector type.
Scalar GaussianCurvature() const
Returns an estimate of the Gaussian curvature.
SampleMatrix m_A
Quadric input samples.
Scalar kMean() const
Returns an estimate of the mean curvature.
VectorType project(const VectorType &_q) const
Orthogonal projecting on the patch, such that h = f(u,v)
typename DataPoint::Scalar Scalar
Alias to scalar type.
Vector6 m_x
Quadric parameters.
Scalar potential(const VectorType &_q) const
Value of the scalar field at the evaluation point.
This Source Code Form is subject to the terms of the Mozilla Public License, v.