Ponca  94e4a36411c3364f6192f97adfa8ceee67834d6e
Point Cloud Analysis library
Loading...
Searching...
No Matches
curvature.hpp
1
2namespace Ponca {
3 namespace internal
4 {
6 template<class DataPoint, class _NFilter, typename T>
7 void
8#if defined(__GNUC__) and not defined(__clang__)
9 // attribute 'no-tree-vectorize' is required for the init function.
10 // It resolves a crash when compiling with GCC 11.4.0
11 // with the default optimization level (-O3) for release builds.
12 __attribute__((optimize("no-tree-vectorize")))
13#endif
15 Base::init();
16 m_kmin = 0;
17 m_kmax = 0;
18 m_vmin = VectorType::Zero();
19 m_vmax = VectorType::Zero();
20 m_isValid = false;
21 }
22
23
24 template<class DataPoint, class _NFilter, typename T>
25 void
27 Scalar kmin, Scalar kmax, const VectorType &vmin, const VectorType &vmax) {
28 if(kmin <= kmax) {
29 m_kmin = kmin;
30 m_kmax = kmax;
31 m_vmin = vmin;
32 m_vmax = vmax;
33 } else {
34 m_kmin = kmax;
35 m_kmax = kmin;
36 m_vmin = vmax;
37 m_vmax = vmin;
38 }
39 m_isValid = true;
40 }
41 }
42}
void init()
Set the evaluation position and reset the internal states.
Definition curvature.hpp:14
void setCurvatureValues(Scalar kmin, Scalar kmax, const VectorType &vmin, const VectorType &vmax)
Set curvature values. To be called in finalize() by child classes.
Definition curvature.hpp:26
typename Base::VectorType VectorType
Alias to vector type.
Definition curvature.h:23
typename DataPoint::Scalar Scalar
Alias to scalar type.
Definition curvature.h:23
This Source Code Form is subject to the terms of the Mozilla Public License, v.