8#include "../../defines.h"
9#include "../concepts.h"
11#define MEAN_POSITION_DER_REQUIREMENTS ProvidesBasketDiffUnitBase<T>&& ProvidesMeanPosition<T>
12#define MEAN_NORMAL_DER_REQUIREMENTS ProvidesBasketDiffUnitBase<T>&& ProvidesMeanNormal<T>
26 template <
class DataPo
int,
class _NFilter,
typename T>
29 PONCA_FITTING_DECLARE_DEFAULT_TYPES
36 PONCA_FITTING_DECLARE_INIT
37 PONCA_FITTING_DECLARE_ADDNEIGHBOR
47 return Base::getNeighborFrame().convertToGlobalBasis(barycenterLocal());
66 PONCA_MULTIARCH
inline VectorType barycenterLocal()
const {
return (
m_sumP / Base::getWeightSum()); }
80 template <
class DataPo
int,
class _NFilter,
typename T>
83 PONCA_FITTING_DECLARE_DEFAULT_TYPES
90 PONCA_FITTING_DECLARE_INIT
91 PONCA_FITTING_DECLARE_ADDNEIGHBOR
99 PONCA_MULTIARCH [[nodiscard]]
inline VectorType meanNormalVector()
const
101 return (m_sumN / Base::getWeightSum());
118 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
119 requires MEAN_POSITION_DER_REQUIREMENTS
122 PONCA_FITTING_DECLARE_DEFAULT_TYPES
123 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
131 PONCA_FITTING_DECLARE_INIT
132 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
160 PONCA_MULTIARCH [[nodiscard]]
VectorArray barycenterDerivatives()
const
162 return (m_dSumP - Base::barycenterLocal() * Base::m_dSumW) / Base::getWeightSum();
179 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
180 requires MEAN_NORMAL_DER_REQUIREMENTS
183 PONCA_FITTING_DECLARE_DEFAULT_TYPES
184 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
192 PONCA_FITTING_DECLARE_INIT
193 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
223 PONCA_MULTIARCH [[nodiscard]]
VectorArray dMeanNormal()
const
225 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.
Compute the mean normal of the input points.
typename Base::VectorType VectorType
Alias to vector type.
Compute the derivatives of the input points barycenter.
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.
Ponca::MeanPosition T barycenter() const
where are all the point samples in 's neighborhood
Scalar barycenterDistance() const
The distance between the barycenter and the basis center.