10#include PONCA_MULTIARCH_INCLUDE_CU_STD(utility)
26template<
class DataPo
int>
30 using Scalar =
typename DataPoint::Scalar;
41 : m_p(_evalPoint.pos()) {}
56 bool _isPositionVector =
true)
const {
57 return ( _isPositionVector ? (_q + m_p) : _q );
71 bool _isPositionVector =
true)
const {
72 return ( _isPositionVector ? (_q - m_p) : _q );
94template<
class DataPo
int>
98 using Scalar =
typename DataPoint::Scalar;
152template <
class DataPo
int,
class WeightKernel>
157 using Scalar =
typename DataPoint::Scalar;
167 static constexpr bool isCompact = WeightKernel::isCompact;
223 const DataPoint& )
const;
247 const DataPoint& )
const;
264 const DataPoint& )
const;
285 const DataPoint& )
const;
307 const DataPoint& )
const;
325template <
class DataPo
int,
template <
typename>
typename _NeighborhoodFrame>
330 using Scalar =
typename DataPoint::Scalar;
338 using NeighborhoodFrame = _NeighborhoodFrame<DataPoint>;
344 : NeighborhoodFrame(v){ }
348 : NeighborhoodFrame(v.pos()){ }
356 return {
Scalar(1), NeighborhoodFrame::convertToLocalBasis(_q.pos())};
365 const DataPoint& )
const
366 {
return VectorType::Zeros(); }
374 const DataPoint& )
const
375 {
return MatrixType::Zeros(); }
382 const DataPoint& )
const
390 const DataPoint& )
const
399 const DataPoint& )
const
400 {
return VectorType::Zeros(); }
408template <
class DataPo
int,
typename NeighborFilter>
411 using Base = NeighborFilter;
413 using Scalar =
typename DataPoint::Scalar;
426 const VectorType & _evalPos = VectorType::Zero(),
428 const VectorType & _evalNormal = VectorType::Zero())
429 : Base(_evalPos, _t),
m_n(_evalNormal) {}
432 const DataPoint& _evalPoint,
434 : Base(_evalPoint.pos(), _t),
m_n(_evalPoint.normal()) {}
442template <
class DataPo
int>
446template <
class DataPo
int>
449#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 .
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.
VectorType evalPos() const
Get access to the stored points of evaluation.
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.