Blender V4.3
AdvancedFunctions0D.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
13#include "../image/Image.h"
14
16
17//
18// Functions definitions
19//
21
22namespace Freestyle {
23
24namespace Functions0D {
25
26// DensityF0D
31class DensityF0D : public UnaryFunction0D<double> {
32 public:
38 DensityF0D(double sigma = 2) : UnaryFunction0D<double>()
39 {
40 _filter.setSigma((float)sigma);
41 }
42
44 string getName() const
45 {
46 return "DensityF0D";
47 }
48
51
52 private:
53 GaussianFilter _filter;
54};
55
56// LocalAverageDepthF0D
60class LocalAverageDepthF0D : public UnaryFunction0D<double> {
61 private:
62 GaussianFilter _filter;
63
64 public:
67 {
68 _filter.setSigma((float)maskSize / 2.0f);
69 }
70
72 string getName() const
73 {
74 return "LocalAverageDepthF0D";
75 }
76
79};
80
81// ReadMapPixel
83class ReadMapPixelF0D : public UnaryFunction0D<float> {
84 private:
85 const char *_mapName;
86 int _level;
87
88 public:
96 ReadMapPixelF0D(const char *iMapName, int level) : UnaryFunction0D<float>()
97 {
98 _mapName = iMapName;
99 _level = level;
100 }
101
103 string getName() const
104 {
105 return "ReadMapPixelF0D";
106 }
107
110};
111
112// ReadSteerableViewMapPixel
115 private:
116 uint _orientation;
117 int _level;
118
119 public:
127 {
128 _orientation = nOrientation;
129 _level = level;
130 }
131
133 string getName() const
134 {
135 return "ReadSteerableViewMapPixelF0D";
136 }
137
140};
141
142// ReadCompleteViewMapPixel
145 private:
146 int _level;
147
148 public:
154 {
155 _level = level;
156 }
157
159 string getName() const
160 {
161 return "ReadCompleteViewMapPixelF0D";
162 }
163
166};
167
168// GetViewMapGradientNormF0D
171 private:
172 int _level;
173 float _step;
174
175 public:
181 {
182 _level = level;
183 _step = (float)pow(2.0, _level);
184 }
185
187 string getName() const
188 {
189 return "GetViewMapGradientNormF0D";
190 }
191
194};
195
196} // end of namespace Functions0D
197
198} /* namespace Freestyle */
unsigned int uint
typedef double(DMatrix)[4][4]
Functions taking 0D input.
Class to perform gaussian filtering operations on an image.
Class to encapsulate an array of RGB or Gray level values.
int operator()(Interface0DIterator &iter)
ReadMapPixelF0D(const char *iMapName, int level)
int operator()(Interface0DIterator &iter)
pow(value.r - subtrahend, 2.0)") .do_static_compilation(true)
draw_view in_light_buf[] float
inherits from class Rep
Definition AppCanvas.cpp:20
double real
Definition Precision.h:14