10#include "./primitive.h"
24 template <
class DataPo
int,
class _NFilter,
typename T>
27 PONCA_FITTING_DECLARE_DEFAULT_TYPES
32 PROVIDES_MEAN_POSITION
38 PONCA_FITTING_DECLARE_INIT
39 PONCA_FITTING_DECLARE_ADDNEIGHBOR
47 PONCA_MULTIARCH
inline VectorType barycenter()
const
49 return Base::getNeighborFilter().convertToGlobalBasis(barycenterLocal());
68 PONCA_MULTIARCH
inline VectorType barycenterLocal()
const {
return (
m_sumP / Base::getWeightSum()); }
83 template <
class DataPo
int,
class _NFilter,
typename T>
86 PONCA_FITTING_DECLARE_DEFAULT_TYPES
97 PONCA_FITTING_DECLARE_INIT
98 PONCA_FITTING_DECLARE_ADDNEIGHBOR
106 PONCA_MULTIARCH [[nodiscard]]
inline VectorType meanNormalVector()
const
108 return (m_sumN / Base::getWeightSum());
125 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
128 PONCA_FITTING_DECLARE_DEFAULT_TYPES
129 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
134 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE && Base::PROVIDES_MEAN_POSITION,
143 PONCA_FITTING_DECLARE_INIT
144 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
172 PONCA_MULTIARCH [[nodiscard]]
VectorArray barycenterDerivatives()
const
174 return (m_dSumP - Base::barycenterLocal() * Base::m_dSumW) / Base::getWeightSum();
191 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
194 PONCA_FITTING_DECLARE_DEFAULT_TYPES
195 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
200 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE && Base::PROVIDES_MEAN_NORMAL,
209 PONCA_FITTING_DECLARE_INIT
210 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
240 PONCA_MULTIARCH [[nodiscard]]
VectorArray dMeanNormal()
const
242 return (m_dSumN - Base::meanNormalVector() * Base::m_dSumW) / Base::getWeightSum();
Compute the derivatives of the input points mean normal.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
@ PROVIDES_MEAN_NORMAL_DERIVATIVE
Provides derivative of the mean normal.
Compute the mean normal of the input points.
typename Base::VectorType VectorType
Alias to vector type.
Compute the derivatives of the input points barycenter.
@ PROVIDES_MEAN_POSITION_DERIVATIVE
Provides derivative of the mean position.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
Compute the barycenter of the input points.
VectorType m_sumP
Sum of the input points vectors.
MeanPosition< DataPoint, _NFilter, T > & meanPosition()
Explicit conversion to MeanPosition , to access methods potentially hidden by heritage.
typename Base::VectorType VectorType
Alias to vector type.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Scalar barycenterDistance() const
The distance between the barycenter and the basis center.