CB-Set3.h
Go to the documentation of this file.
1
/**
2
* This file was automatically created with "create_c++_header.sh".
3
* Do not edit manually.
4
*/
5
#pragma once
6
#include "../../colormap.h"
7
8
namespace
colormap
9
{
10
namespace
IDL
11
{
12
13
class
CBSet3
:
public
Colormap
14
{
15
private
:
16
class
Wrapper :
public
WrapperBase
17
{
18
public
:
19
#ifdef float
20
#error "TODO"
21
#endif
22
#define float local_real_t
23
#include "../../../../shaders/glsl/IDL_CB-Set3.frag"
24
#undef float
25
};
26
27
public
:
28
Color
getColor
(
double
x)
const override
29
{
30
Wrapper w;
31
vec4
c
= w.colormap(x);
32
Color
result;
33
result.
r
=
std::max
(0.0,
std::min
(1.0,
c
.r));
34
result.
g
=
std::max
(0.0,
std::min
(1.0,
c
.g));
35
result.
b
=
std::max
(0.0,
std::min
(1.0,
c
.b));
36
result.
a
=
std::max
(0.0,
std::min
(1.0,
c
.a));
37
return
result;
38
}
39
40
std::string
getTitle
()
const override
41
{
42
return
std::string(
"CB-Set3"
);
43
}
44
45
std::string
getCategory
()
const override
46
{
47
return
std::string(
"IDL"
);
48
}
49
50
std::string
getSource
()
const override
51
{
52
return
std::string(
53
"float colormap_red(float x) {\n"
54
" if (x < 0.09082479229584027) {\n"
55
" return 1.24879652173913E+03 * x + 1.41460000000000E+02;\n"
56
" } else if (x < 0.1809653122266933) {\n"
57
" return -7.21339920948626E+02 * x + 3.20397233201581E+02;\n"
58
" } else if (x < 0.2715720097177793) {\n"
59
" return 6.77416996047422E+02 * x + 6.72707509881444E+01;\n"
60
" } else if (x < 0.3619607687891861) {\n"
61
" return -1.36850782608711E+03 * x + 6.22886666666710E+02;\n"
62
" } else if (x < 0.4527609316115322) {\n"
63
" return 1.38118774703557E+03 * x - 3.72395256916997E+02;\n"
64
" } else if (x < 0.5472860687991931) {\n"
65
" return -7.81436521739194E+02 * x + 6.06756521739174E+02;\n"
66
" } else if (x < 0.6360981817705944) {\n"
67
" return 8.06836521739242E+02 * x - 2.62483188405869E+02;\n"
68
" } else if (x < 0.8158623444475089) {\n"
69
" return -3.49616157878512E+02 * x + 4.73134258402717E+02;\n"
70
" } else if (x < 0.9098023786863947) {\n"
71
" return 1.72428853754953E+02 * x + 4.72173913043111E+01;\n"
72
" } else {\n"
73
" return 5.44142292490101E+02 * x - 2.90968379446626E+02;\n"
74
" }\n"
75
"}\n"
76
"\n"
77
"float colormap_green(float x) {\n"
78
" if (x < 0.08778161310534617) {\n"
79
" return 4.88563478260870E+02 * x + 2.10796666666667E+02;\n"
80
" } else if (x < 0.2697669137324175) {\n"
81
" return -6.96835646006769E+02 * x + 3.14852913968545E+02;\n"
82
" } else if (x < 0.3622079895714037) {\n"
83
" return 5.40799130434797E+02 * x - 1.90200000000068E+01;\n"
84
" } else if (x < 0.4519795462045253) {\n"
85
" return 3.23774703557373E+01 * x + 1.65134387351785E+02;\n"
86
" } else if (x < 0.5466820192751115) {\n"
87
" return 4.43064347826088E+02 * x - 2.04876811594176E+01;\n"
88
" } else if (x < 0.6368889369442862) {\n"
89
" return -1.83472332015826E+02 * x + 3.22028656126484E+02;\n"
90
" } else if (x < 0.728402572416003) {\n"
91
" return 1.27250988142231E+02 * x + 1.24132411067220E+02;\n"
92
" } else if (x < 0.8187333479165154) {\n"
93
" return -9.82116600790428E+02 * x + 9.32198616600708E+02;\n"
94
" } else if (x < 0.9094607880855196) {\n"
95
" return 1.17713438735149E+03 * x - 8.35652173912769E+02;\n"
96
" } else {\n"
97
" return 2.13339920948864E+01 * x + 2.15502964426857E+02;\n"
98
" }\n"
99
"}\n"
100
"\n"
101
"float colormap_blue(float x) {\n"
102
" if (x < 0.09081516507716858) {\n"
103
" return -2.27937391304345E+02 * x + 1.99486666666666E+02;\n"
104
" } else if (x < 0.1809300436999751) {\n"
105
" return 4.33958498023703E+02 * x + 1.39376482213440E+02;\n"
106
" } else if (x < 0.2720053156712806) {\n"
107
" return -1.14300000000004E+03 * x + 4.24695652173923E+02;\n"
108
" } else if (x < 0.3616296568054424) {\n"
109
" return 1.08175889328072E+03 * x - 1.80450592885399E+02;\n"
110
" } else if (x < 0.4537067088757783) {\n"
111
" return -1.22681999999994E+03 * x + 6.54399999999974E+02;\n"
112
" } else if (x < 0.5472726179445029) {\n"
113
" return 8.30770750988243E+01 * x + 6.00909090909056E+01;\n"
114
" } else if (x < 0.6374811920489858) {\n"
115
" return 1.36487351778676E+03 * x - 6.41401185770872E+02;\n"
116
" } else if (x < 0.7237636846906381) {\n"
117
" return -1.27390769230737E+02 * x + 3.09889230769173E+02;\n"
118
" } else if (x < 0.8178226469606309) {\n"
119
" return -3.01831168831021E+02 * x + 4.36142857142782E+02;\n"
120
" } else if (x < 0.9094505664375214) {\n"
121
" return 8.47622811970801E+01 * x + 1.19977978543158E+02;\n"
122
" } else {\n"
123
" return -9.06117391304296E+02 * x + 1.02113405797096E+03;\n"
124
" }\n"
125
"}\n"
126
"\n"
127
"vec4 colormap(float x) {\n"
128
" float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
129
" float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
130
" float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
131
" return vec4(r, g, b, 1.0);\n"
132
"}\n"
133
);
134
}
135
};
136
137
}
// namespace IDL
138
}
// namespace colormap
colormap::IDL::CBSet3::getSource
std::string getSource() const override
Definition:
CB-Set3.h:50
colormap::Colormap
Definition:
colormap.h:17
colormap::Color::g
double g
Definition:
colormap.h:14
colormap::IDL::CBSet3::getCategory
std::string getCategory() const override
Definition:
CB-Set3.h:45
c
constexpr T c
Definition:
UnscentedKalmanFilterTest.cpp:43
colormap::Colormap::vec4
Definition:
colormap.h:32
colormap::IDL::CBSet3::getColor
Color getColor(double x) const override
Definition:
CB-Set3.h:28
colormap::Color::a
double a
Definition:
colormap.h:14
colormap::Color::b
double b
Definition:
colormap.h:14
max
T max(T t1, T t2)
Definition:
gdiam.h:48
colormap::IDL::CBSet3
Definition:
CB-Set3.h:13
colormap::Color
Definition:
colormap.h:12
colormap::IDL::CBSet3::getTitle
std::string getTitle() const override
Definition:
CB-Set3.h:40
colormap
This file was automatically created with "create_c++_header.sh".
Definition:
colormap.h:9
colormap::Color::r
double r
Definition:
colormap.h:14
colormap::Colormap::WrapperBase
Definition:
colormap.h:144
min
T min(T t1, T t2)
Definition:
gdiam.h:42
VisionX
components
pointcloud_processor
DenseCRFSegmentationProcessor
include
colormap
private
IDL
CB-Set3.h
Generated on Sat Oct 12 2024 09:14:16 for armarx_documentation by
1.8.17