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
55 return (
m_sumP / Base::getWeightSum());
78 template<
class DataPo
int,
class _WFunctor,
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());
101 template<
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
103 PONCA_FITTING_DECLARE_DEFAULT_TYPES
104 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
108 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
109 Base::PROVIDES_MEAN_POSITION,
118 PONCA_FITTING_DECLARE_INIT
119 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
143 return (
m_dSumP - Base::barycenterLocal() * Base::m_dSumW ) / Base::getWeightSum();
148 template<
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
150 PONCA_FITTING_DECLARE_DEFAULT_TYPES
151 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
155 Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE &&
156 Base::PROVIDES_MEAN_NORMAL,
166 PONCA_FITTING_DECLARE_INIT
167 PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER
192 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.
MeanPosition< DataPoint, _WFunctor, 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.