8#include "../../defines.h"
9#include "../concepts.h"
11#define MEAN_NORMAL_REQUIREMENTS ProvidesNormal<DataPoint>
12#define MEAN_POSITION_DER_REQUIREMENTS ProvidesBasketDiffUnitBase<T>&& ProvidesMeanPosition<T>
13#define MEAN_NORMAL_DER_REQUIREMENTS ProvidesBasketDiffUnitBase<T>&& ProvidesMeanNormal<T>
27 template <
class DataPo
int,
class _NFilter,
typename T>
30 PONCA_FITTING_DECLARE_DEFAULT_TYPES
37 PONCA_FITTING_DECLARE_INIT
38 PONCA_FITTING_DECLARE_ADDNEIGHBOR
48 return Base::getNeighborFrame().convertToGlobalBasis(barycenterLocal());
67 PONCA_MULTIARCH
inline VectorType barycenterLocal()
const {
return (
m_sumP / Base::getWeightSum()); }
81 template <
class DataPo
int,
class _NFilter,
typename T>
82 requires MEAN_NORMAL_REQUIREMENTS
85 PONCA_FITTING_DECLARE_DEFAULT_TYPES
92 PONCA_FITTING_DECLARE_INIT
93 PONCA_FITTING_DECLARE_ADDNEIGHBOR
101 PONCA_MULTIARCH [[nodiscard]]
inline VectorType meanNormalVector()
const
103 return (m_sumN / Base::getWeightSum());
120 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
121 requires MEAN_POSITION_DER_REQUIREMENTS
124 PONCA_FITTING_DECLARE_DEFAULT_TYPES
125 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
133 PONCA_FITTING_DECLARE_INIT
134 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
162 PONCA_MULTIARCH [[nodiscard]]
VectorArray barycenterDerivatives()
const
164 return (m_dSumP - Base::barycenterLocal() * Base::m_dSumW) / Base::getWeightSum();
181 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
182 requires MEAN_NORMAL_DER_REQUIREMENTS
185 PONCA_FITTING_DECLARE_DEFAULT_TYPES
186 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
194 PONCA_FITTING_DECLARE_INIT
195 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
225 PONCA_MULTIARCH [[nodiscard]]
VectorArray dMeanNormal()
const
227 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.