Ponca  aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
Loading...
Searching...
No Matches
mlsSphereFitDer.h
1/*
2 This Source Code Form is subject to the terms of the Mozilla Public
3 License, v. 2.0. If a copy of the MPL was not distributed with this
4 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5*/
6
7#pragma once
8
9#include "./defines.h"
10
11namespace Ponca
12{
13
23template < class DataPoint, class _WFunctor, int DiffType, typename T>
24class MlsSphereFitDer : public T
25{
26PONCA_FITTING_DECLARE_DEFAULT_TYPES
27PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
28
29protected:
30 enum
31 {
32 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE & Base::PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE,
33 PROVIDES_NORMAL_DERIVATIVE
34 };
35
36 enum
37 {
38 Dim = DataPoint::Dim,
39 DerDim = Base::NbDerivatives
40 };
41
42public:
54 typedef Eigen::Matrix< Scalar, DerDim, DerDim > Matrix;
55
75 typedef Eigen::Matrix< Scalar, DerDim, Dim*DerDim > MatrixArray;
76
77protected:
78 // computation data
86public:
87 // results
92public:
93 PONCA_EXPLICIT_CAST_OPERATORS_DER(MlsSphereFitDer,mlsSphereFitDer)
94 PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE
95
98 PONCA_MULTIARCH inline ScalarArray dPotential() const;
99
101 PONCA_MULTIARCH inline VectorType primitiveGradient() const;
102
104 PONCA_MULTIARCH inline VectorArray dNormal() const;
105
106}; //class MlsSphereFitDer
107
108#include "mlsSphereFitDer.hpp"
109
110} //namespace Ponca
Extension performing derivation of the mls surface.
ScalarArray dPotential() const
Returns the derivatives of the scalar field at the evaluation point.
Eigen::Matrix< Scalar, DerDim, DerDim > Matrix
Static squared matrix of scalars with a size adapted to the differentiation type.
typename Base::VectorType VectorType
Alias to vector type.
MatrixArray m_d2SumP
Sum of relative positions with twice differenciated weights.
Matrix m_d2SumDotPN
Sum of the dot product between relative positions and normals with twice differenciated weights.
VectorType primitiveGradient() const
Value of the normal of the primitive at the evaluation point.
MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T > & mlsSphereFitDer()
Explicit conversion to MlsSphereFitDer , to access methods potentially hidden by heritage.
Eigen::Matrix< Scalar, DerDim, Dim *DerDim > MatrixArray
Static matrix of scalars with a size adapted to the differentiation type and the dimension of the amb...
Matrix m_d2Uc
Second derivative of the hyper-sphere constant term
Matrix m_d2SumDotPP
Sum of the squared relative positions with twice differenciated weights.
MatrixArray m_d2Ul
Second derivative of the hyper-sphere linear term
VectorArray dNormal() const
Returns the second derivatives of the scalar field at the evaluation point.
@ Dim
Dimension of the ambient space.
@ DerDim
Number of dimensions used for the differentiation.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
Matrix m_d2SumW
Sum of queries weight with twice differenciated weights.
MatrixArray m_d2SumN
Sum of normal vectors with twice differenciated weights.
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
Matrix m_d2Uq
Second derivative of the hyper-sphere quadratic term.
This Source Code Form is subject to the terms of the Mozilla Public License, v.