Blender  V3.3
AdvancedPredicates1D.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include <string>
11 
12 #include "AdvancedFunctions1D.h"
13 #include "Predicates1D.h"
14 
15 #include "../view_map/Interface1D.h"
16 
17 //
18 // Predicates definitions
19 //
21 
22 namespace Freestyle {
23 
24 namespace Predicates1D {
25 
26 // DensityLowerThanUP1D
31  public:
39  DensityLowerThanUP1D(double threshold, double sigma = 2)
40  {
41  _threshold = threshold;
42  _sigma = sigma;
43  }
44 
46  string getName() const
47  {
48  return "DensityLowerThanUP1D";
49  }
50 
52  int operator()(Interface1D &inter)
53  {
54  Functions1D::DensityF1D fun(_sigma);
55  if (fun(inter) < 0) {
56  return -1;
57  }
58  result = (fun.result < _threshold);
59  return 0;
60  }
61 
62  private:
63  double _sigma;
64  double _threshold;
65 };
66 
67 } // end of namespace Predicates1D
68 
69 } /* namespace Freestyle */
Functions taking 1D input.
Class gathering stroke creation algorithms.
DensityLowerThanUP1D(double threshold, double sigma=2)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
inherits from class Rep
Definition: AppCanvas.cpp:18