10#include "./primitive.h"
23 template<
class DataPo
int,
class _NFilter,
typename T>
25 PONCA_FITTING_DECLARE_DEFAULT_TYPES
28 enum { PROVIDES_MEAN_POSITION };
33 PONCA_FITTING_DECLARE_INIT
34 PONCA_FITTING_DECLARE_ADDNEIGHBOR
41 return Base::getNeighborFilter().convertToGlobalBasis(
barycenterLocal() );
62 return (
m_sumP / Base::getWeightSum());
78 template<
class DataPo
int,
class _NFilter,
typename T>
80 PONCA_FITTING_DECLARE_DEFAULT_TYPES
83 enum { PROVIDES_MEAN_NORMAL };
88 PONCA_FITTING_DECLARE_INIT
89 PONCA_FITTING_DECLARE_ADDNEIGHBOR
96 return (
m_sumN / Base::getWeightSum());
113 template<
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
115 PONCA_FITTING_DECLARE_DEFAULT_TYPES
116 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
120 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
121 Base::PROVIDES_MEAN_POSITION,
130 PONCA_FITTING_DECLARE_INIT
131 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
155 return (
m_dSumP - Base::barycenterLocal() * Base::m_dSumW ) / Base::getWeightSum();
172 template<
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
174 PONCA_FITTING_DECLARE_DEFAULT_TYPES
175 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
179 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
180 Base::PROVIDES_MEAN_NORMAL,
190 PONCA_FITTING_DECLARE_INIT
191 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
216 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.
MeanNormalDer< DataPoint, _NFilter, DiffType, T > & meanNormalDer()
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage.
VectorArray m_dSumN
Derivatives of the input normals of the input points vectors.
VectorArray dMeanNormal() const
Compute the derivative of the mean normal vector of the input points.
@ PROVIDES_MEAN_NORMAL_DERIVATIVE
Provides derivative of the mean normal.
Compute the mean normal of the input points.
MeanNormal< DataPoint, _NFilter, T > & meanNormal()
Explicit conversion to MeanNormal , to access methods potentially hidden by heritage.
VectorType m_sumN
Sum of the normal vectors.
typename Base::VectorType VectorType
Alias to vector type.
VectorType meanNormalVector() const
Mean of the normals of the input points.
Compute the derivatives of the input points barycenter.
@ PROVIDES_MEAN_POSITION_DERIVATIVE
Provides derivative of the mean position.
VectorArray m_dSumP
Derivatives of the input points vectors.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
MeanPositionDer< DataPoint, _NFilter, 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).
Compute the barycenter of the input points.
Scalar barycenterDistance() const
The distance between the barycenter and the basis center.
typename DataPoint::Scalar Scalar
Alias to scalar type.
VectorType barycenterLocal() const
Barycenter of the input points expressed in the local frame.
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.
VectorType barycenter() const
Barycenter of the input points expressed in the global frame.
This Source Code Form is subject to the terms of the Mozilla Public License, v.