Blender V4.3
AdvancedPredicates1D.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include <string>
13
14#include "AdvancedFunctions1D.h"
15#include "Predicates1D.h"
16
18
19//
20// Predicates definitions
21//
23
24namespace Freestyle {
25
26namespace Predicates1D {
27
28// DensityLowerThanUP1D
33 public:
41 DensityLowerThanUP1D(double threshold, double sigma = 2)
42 {
43 _threshold = threshold;
44 _sigma = sigma;
45 }
46
48 string getName() const
49 {
50 return "DensityLowerThanUP1D";
51 }
52
55 {
56 Functions1D::DensityF1D fun(_sigma);
57 if (fun(inter) < 0) {
58 return -1;
59 }
60 result = (fun.result < _threshold);
61 return 0;
62 }
63
64 private:
65 double _sigma;
66 double _threshold;
67};
68
69} // end of namespace Predicates1D
70
71} /* namespace Freestyle */
Functions taking 1D input.
Interface 1D and related tools definitions.
Class gathering stroke creation algorithms.
DensityLowerThanUP1D(double threshold, double sigma=2)
inherits from class Rep
Definition AppCanvas.cpp:20