10#include PONCA_MULTIARCH_INCLUDE_CU_STD(utility)
26 template <
class DataPo
int>
31 using Scalar =
typename DataPoint::Scalar;
60 bool _isPositionVector =
true)
const
62 return (_isPositionVector ? (_q + m_p) : _q);
76 bool _isPositionVector =
true)
const
78 return (_isPositionVector ? (_q - m_p) : _q);
100 template <
class DataPo
int>
105 using Scalar =
typename DataPoint::Scalar;
160 template <
class DataPo
int,
class WeightKernel>
165 using Scalar =
typename DataPoint::Scalar;
175 static constexpr bool isCompact = WeightKernel::isCompact;
228 PONCA_MULTIARCH [[nodiscard]]
inline VectorType
spacedw(
const VectorType& _q,
229 const DataPoint& )
const;
253 const DataPoint& )
const;
269 PONCA_MULTIARCH [[nodiscard]]
inline Scalar
scaledw(
const VectorType& _q,
270 const DataPoint& )
const;
290 PONCA_MULTIARCH [[nodiscard]]
inline Scalar
scaled2w(
const VectorType& _q,
291 const DataPoint& )
const;
312 PONCA_MULTIARCH [[nodiscard]]
inline VectorType
scaleSpaced2w(
const VectorType& _q,
313 const DataPoint& )
const;
331 template <
class DataPo
int,
template <
typename>
typename _NeighborhoodFrame>
336 using Scalar =
typename DataPoint::Scalar;
344 using NeighborhoodFrame = _NeighborhoodFrame<DataPoint>;
350 : NeighborhoodFrame(v)
363 return {
Scalar(1), NeighborhoodFrame::convertToLocalBasis(_q.pos())};
371 const DataPoint& )
const
373 return VectorType::Zeros();
381 const DataPoint& )
const
383 return MatrixType::Zeros();
391 const DataPoint& )
const
401 const DataPoint& )
const
412 const DataPoint& )
const
414 return VectorType::Zeros();
424 template <
class DataPo
int,
typename NeighborFilter>
428 using Base = NeighborFilter;
430 using Scalar =
typename DataPoint::Scalar;
444 const VectorType& _evalNormal = VectorType::Zero())
445 : Base(_evalPos, _t),
m_n(_evalNormal)
450 : Base(_evalPoint.pos(), _t),
m_n(_evalPoint.normal())
461 template <
class DataPo
int>
465 template <
class DataPo
int>
468#include "weightFunc.hpp"
NeighborhoodFrame that express 3d points relatively to a prescribed center.
VectorType convertToLocalBasis(const VectorType &_q, bool _isPositionVector=true) const
Convert query from global to local coordinate system, such as .
const VectorType & evalPos() const
Get access to the stored points of evaluation.
VectorType convertToGlobalBasis(const VectorType &_q, bool _isPositionVector=true) const
Convert query from local to global coordinate system, such as .
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
void changeNeighborhoodFrame(const VectorType &_newEvalPos)
Change neighborhood frame (move basis center)
static constexpr bool hasLocalFrame
Flag indicating that this class modifies the coordinates when passing from global to local.
Weight neighbors according to the euclidean distance between a query and a reference position.
Scalar scaledw(const VectorType &_q, const DataPoint &) const
First order derivative in scale .
Scalar scaled2w(const VectorType &_q, const DataPoint &) const
Second order derivative in scale .
VectorType scaleSpaced2w(const VectorType &_q, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension .
MatrixType spaced2w(const VectorType &_q, const DataPoint &) const
Second order derivative in space (for each spatial dimension .
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
DistWeightFunc(const VectorType &_evalPos=VectorType::Zero(), const Scalar &_t=Scalar(1.))
Constructor that defines the current evaluation scale.
Scalar evalScale() const
Access to the evaluation scale set during the initialization.
VectorType spacedw(const VectorType &_q, const DataPoint &) const
First order derivative in space (for each spatial dimension .
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
WeightReturnType operator()(const DataPoint &q) const
Compute the weight of the given query with respect to its coordinates.
WeightKernel m_wk
1D function applied to weight queries
static constexpr bool isCompact
Flag indicating if the weighting kernel is compact of not.
DistWeightFunc(const DataPoint &_evalPoint, const Scalar &_t=Scalar(1.))
!
Scalar m_t
Evaluation scale.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
NeighborhoodFrame that keep points in the global frame without applying any transformation.
static constexpr bool hasLocalFrame
Flag indicating that this class does not modify the coordinates when passing from global to local.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
void changeNeighborhoodFrame(const VectorType &)
Change neighborhood frame (has no effect for global basis)
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
const VectorType & convertToGlobalBasis(const VectorType &_q, bool=true) const
Convert position from local to global coordinate system : does nothing as this is global frame.
const VectorType & convertToLocalBasis(const VectorType &_q, bool=true) const
Convert query from global to local coordinate system : does nothing as this is global frame.
This class extends a NeighborFilter class to also store the normal of the evaluation point,...
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
const VectorType & evalNormal() const
Access to the evaluation normal set during the initialization.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
NeighborFilterStoreNormal(const VectorType &_evalPos=VectorType::Zero(), const Scalar &_t=Scalar(0), const VectorType &_evalNormal=VectorType::Zero())
Constructor that defines the current evaluation scale.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
VectorType m_n
Evaluation normal.
Base Weighting function that set uniform weight to all samples.
WeightReturnType operator()(const DataPoint &_q) const
Compute the weight of the given query, which is always $1$.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
NoWeightFuncBase(const DataPoint &v, Scalar=0)
!
VectorType spacedw(const VectorType &, const DataPoint &) const
First order derivative in space (for each spatial dimension , which are always $0$.
Scalar scaledw(const VectorType &, const DataPoint &) const
First order derivative in scale , which are always $0$.
Scalar scaled2w(const VectorType &, const DataPoint &) const
Second order derivative in scale , which are always $0$.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
VectorType scaleSpaced2w(const VectorType &, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension , which are always $0$.
NoWeightFuncBase(const VectorType &v=VectorType::Zero(), Scalar=0)
Default constructor.
MatrixType spaced2w(const VectorType &, const DataPoint &) const
Second order derivative in space (for each spatial dimension , which are always $0$.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
This Source Code Form is subject to the terms of the Mozilla Public License, v.