Ponca  bab7704293a2c36e5bed9dea40def7ba839bfe08
Point Cloud Analysis library
Loading...
Searching...
No Matches
curvature.hpp
1
2namespace Ponca
3{
4 namespace internal
5 {
7 template <class DataPoint, class _NFilter, typename T>
8 void
9#if defined(__GNUC__) && !defined(__clang__)
10 // attribute 'no-tree-vectorize' is required for the init function.
11 // It resolves a crash when compiling with GCC 11.4.0
12 // with the default optimization level (-O3) for release builds.
13 __attribute__((optimize("no-tree-vectorize")))
14#endif
16 {
17 Base::init();
18 m_kmin = 0;
19 m_kmax = 0;
20 m_vmin = VectorType::Zero();
21 m_vmax = VectorType::Zero();
22 m_isValid = false;
23 }
24
25 template <class DataPoint, class _NFilter, typename T>
27 const VectorType& vmin,
28 const VectorType& vmax)
29 {
30 if (kmin <= kmax)
31 {
32 m_kmin = kmin;
33 m_kmax = kmax;
34 m_vmin = vmin;
35 m_vmax = vmax;
36 }
37 else
38 {
39 m_kmin = kmax;
40 m_kmax = kmin;
41 m_vmin = vmax;
42 m_vmax = vmin;
43 }
44 m_isValid = true;
45 }
46 } // namespace internal
47} // namespace Ponca
void init()
Set the evaluation position and reset the internal states.
Definition curvature.hpp:15
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.