10#include "./primitive.h"
23 template<
class DataPo
int,
class _WFunctor,
typename T>
25 PONCA_FITTING_DECLARE_DEFAULT_TYPES
28 enum { PROVIDES_MEAN_POSITION };
33 PONCA_FITTING_DECLARE_INIT
34 PONCA_FITTING_DECLARE_ADDNEIGHBOR
62 return (
m_sumP / Base::getWeightSum());
85 template<
class DataPo
int,
class _WFunctor,
typename T>
87 PONCA_FITTING_DECLARE_DEFAULT_TYPES
90 enum { PROVIDES_MEAN_NORMAL };
95 PONCA_FITTING_DECLARE_INIT
96 PONCA_FITTING_DECLARE_ADDNEIGHBOR
103 return (
m_sumN / Base::getWeightSum());
108 template<
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
110 PONCA_FITTING_DECLARE_DEFAULT_TYPES
111 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
115 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
116 Base::PROVIDES_MEAN_POSITION,
125 PONCA_FITTING_DECLARE_INIT
126 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
150 return (
m_dSumP - Base::barycenterLocal() * Base::m_dSumW ) / Base::getWeightSum();
155 template<
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
157 PONCA_FITTING_DECLARE_DEFAULT_TYPES
158 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
162 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
163 Base::PROVIDES_MEAN_NORMAL,
173 PONCA_FITTING_DECLARE_INIT
174 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
199 return (
m_dSumN - Base::meanNormalVector() * Base::m_dSumW ) / Base::getWeightSum();
MeanNormalDer< DataPoint, _WFunctor, DiffType, T > & meanNormalDer()
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
VectorArray dMeanNormal() const
Compute the derivative of the mean normal vector of the input points.
VectorArray m_dSumN
Derivatives of the input normals of the input points vectors.
@ PROVIDES_MEAN_NORMAL_DERIVATIVE
Provides derivative of the mean normal.
Compute the barycenter of the input points + their normals.
typename Base::VectorType VectorType
Alias to vector type.
VectorType m_sumN
Sum of the normal vectors.
VectorType meanNormalVector() const
Mean of the normals of the input points.
MeanNormal< DataPoint, _WFunctor, T > & meanNormal()
Explicit conversion to MeanNormal , to access methods potentially hidden by heritage.
VectorArray m_dSumP
Derivatives of the input points vectors.
@ PROVIDES_MEAN_POSITION_DERIVATIVE
Provides derivative of the mean position.
MeanPositionDer< DataPoint, _WFunctor, DiffType, T > & meanPositionDer()
Explicit conversion to MeanPositionDer , to access methods potentially hidden by heritage.
VectorArray barycenterDerivatives() const
Compute derivatives of the barycenter (in local frame).
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
Compute the barycenter of the input points.
VectorType barycenter() const
Barycenter of the input points expressed in the global frame.
VectorType barycenterLocal() const
Barycenter of the input points expressed in the local frame.
VectorType m_sumP
Sum of the input points vectors.
Scalar barycenterDistance() const
The distance between the barycenter and the basis center.
MeanPosition< DataPoint, _WFunctor, T > & meanPosition()
Explicit conversion to MeanPosition , to access methods potentially hidden by heritage.
typename DataPoint::Scalar Scalar
Alias to scalar type.
typename Base::VectorType VectorType
Alias to vector type.
This Source Code Form is subject to the terms of the Mozilla Public License, v.