CB-Accent.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
CBAccent
:
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-Accent.frag"
24
#undef float
25
};
26
27
public
:
28
Color
29
getColor
(
double
x
)
const override
30
{
31
Wrapper w;
32
vec4
c
= w.colormap(
x
);
33
Color
result;
34
result.
r
= std::max(0.0, std::min(1.0,
c
.r));
35
result.
g
= std::max(0.0, std::min(1.0,
c
.g));
36
result.
b
= std::max(0.0, std::min(1.0,
c
.b));
37
result.
a
= std::max(0.0, std::min(1.0,
c
.a));
38
return
result;
39
}
40
41
std::string
42
getTitle
()
const override
43
{
44
return
std::string(
"CB-Accent"
);
45
}
46
47
std::string
48
getCategory
()
const override
49
{
50
return
std::string(
"IDL"
);
51
}
52
53
std::string
54
getSource
()
const override
55
{
56
return
std::string(
57
"float colormap_red(float x) {\n"
58
" if (x < 0.3953623640294495) {\n"
59
" return 4.43904418116747E+02 * x + 1.27235098111810E+02; // R1\n"
60
" } else if (x < 0.5707952559161218) {\n"
61
" return -1.40693770913775E+03 * x + 8.58988416988442E+02; // R2\n"
62
" } else if (x < 0.7167119613307117) {\n"
63
" return 1.26199099099112E+03 * x - 6.64423423423499E+02; // R3\n"
64
" } else if (x < 0.8579249381242428) {\n"
65
" return -3.45591749644313E+02 * x + 4.87750355618723E+02; // R4\n"
66
" } else {\n"
67
" return -6.12161344537705E+02 * x + 7.16447058823441E+02; // R5\n"
68
" }\n"
69
"}\n"
70
"\n"
71
"float colormap_green(float x) {\n"
72
" if (x < 0.1411385125927322) {\n"
73
" return -1.90229018492177E+02 * x + 2.01102418207681E+02; // G1\n"
74
" } else if (x < 0.2839213365162221) {\n"
75
" return 1.26397818871505E+02 * x + 1.56414177335230E+02; // G2\n"
76
" } else if (x < 0.4292115788900552) {\n"
77
" return 4.30655855855847E+02 * x + 7.00288288288335E+01; // G3\n"
78
" } else if (x < 0.5716859888719092) {\n"
79
" return -1.03353736732686E+03 * x + 6.98477513951204E+02; // G4\n"
80
" } else if (x < 0.7167535225418249) {\n"
81
" return -7.29556302521079E+02 * x + 5.24695798319375E+02; // G5\n"
82
" } else if (x < 0.8577494771113141) {\n"
83
" return 6.31469498069341E+02 * x - 4.50824238524115E+02; // G6\n"
84
" } else {\n"
85
" return 7.78344916345091E+01 * x + 2.40558987558802E+01; // G7\n"
86
" }\n"
87
"}\n"
88
"\n"
89
"float colormap_blue(float x) {\n"
90
" if (x < 0.1418174223507038) {\n"
91
" return 5.96339971550497E+02 * x + 1.27334281650071E+02; // B1\n"
92
" } else if (x < 0.2832901246500529) {\n"
93
" return -5.48535392535404E+02 * x + 2.89697554697557E+02; // B2\n"
94
" } else if (x < 0.4021748491445084) {\n"
95
" return 1.22844950213372E+02 * x + 9.95021337126610E+01; // B3\n"
96
" } else if (x < 0.5699636786725797) {\n"
97
" return 1.60703217503224E+02 * x + 8.42764907764923E+01; // B4\n"
98
" } else if (x < 0.7149788470960766) {\n"
99
" return -3.30626890756314E+02 * x + 3.64316806722696E+02; // B5\n"
100
" } else if (x < 0.8584529189762473) {\n"
101
" return -7.30288215340717E+02 * x + 6.50066199802944E+02; // B6\n"
102
" } else {\n"
103
" return 5.42814671814679E+02 * x - 4.42832689832695E+02; // B7\n"
104
" }\n"
105
"}\n"
106
"\n"
107
"vec4 colormap(float x) {\n"
108
" float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
109
" float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
110
" float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
111
" return vec4(r, g, b, 1.0);\n"
112
"}\n"
);
113
}
114
};
115
116
}
// namespace IDL
117
}
// namespace colormap
c
constexpr T c
Definition
UnscentedKalmanFilterTest.cpp:46
colormap::Colormap::WrapperBase
Definition
colormap.h:147
colormap::Colormap
Definition
colormap.h:18
colormap::IDL::CBAccent
Definition
CB-Accent.h:14
colormap::IDL::CBAccent::getCategory
std::string getCategory() const override
Definition
CB-Accent.h:48
colormap::IDL::CBAccent::getSource
std::string getSource() const override
Definition
CB-Accent.h:54
colormap::IDL::CBAccent::getColor
Color getColor(double x) const override
Definition
CB-Accent.h:29
colormap::IDL::CBAccent::getTitle
std::string getTitle() const override
Definition
CB-Accent.h:42
Color
uint32_t Color
RGBA color.
Definition
color.h:8
colormap.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition
ArmarXTimeserver.cpp:28
colormap::IDL
Definition
16_Level.h:11
colormap
This file was automatically created with "create_c++_header.sh".
Definition
colormap.h:10
colormap::Color
Definition
colormap.h:13
colormap::Color::a
double a
Definition
colormap.h:14
colormap::Color::b
double b
Definition
colormap.h:14
colormap::Color::r
double r
Definition
colormap.h:14
colormap::Color::g
double g
Definition
colormap.h:14
colormap::Colormap::vec4
Definition
colormap.h:34
VisionX
components
pointcloud_processor
DenseCRFSegmentationProcessor
include
colormap
private
IDL
CB-Accent.h
Generated by
1.13.2