Rainbow_18.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
Rainbow18
:
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_Rainbow_18.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(
"Rainbow_18"
);
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(
"vec4 colormap(float x) {\n"
57
" float x16 = x * 16.0;\n"
58
" const float a = 255.0;\n"
59
" const float s = 1.0 / 255.0;\n"
60
" if (x16 < 1.0) {\n"
61
" return vec4(150.0, 0.0, 150.0, a) * s;\n"
62
" } else if (x16 < 2.0) {\n"
63
" return vec4(200.0, 0.0, 200.0, a) * s;\n"
64
" } else if (x16 < 3.0) {\n"
65
" return vec4(100.0, 100.0, 150.0, a) * s;\n"
66
" } else if (x16 < 4.0) {\n"
67
" return vec4(100.0, 100.0, 200.0, a) * s;\n"
68
" } else if (x16 < 5.0) {\n"
69
" return vec4(100.0, 100.0, 255.0, a) * s;\n"
70
" } else if (x16 < 6.0) {\n"
71
" return vec4(0.0, 140.0, 0.0, a) * s;\n"
72
" } else if (x16 < 7.0) {\n"
73
" return vec4(150.0, 170.0, 0.0, a) *s;\n"
74
" } else if (x16 < 8.0) {\n"
75
" return vec4(200.0, 200.0, 0.0, a) * s;\n"
76
" } else if (x16 < 9.0) {\n"
77
" return vec4(150.0, 200.0, 0.0, a) * s;\n"
78
" } else if (x16 < 10.0) {\n"
79
" return vec4(200.0, 255.0, 120.0, a) * s;\n"
80
" } else if (x16 < 11.0) {\n"
81
" return vec4(255.0, 255.0, 0.0, a) * s;\n"
82
" } else if (x16 < 12.0) {\n"
83
" return vec4(255.0, 200.0, 0.0, a) * s;\n"
84
" } else if (x16 < 13.0) {\n"
85
" return vec4(255.0, 160.0, 0.0, a) * s;\n"
86
" } else if (x16 < 14.0) {\n"
87
" return vec4(255.0, 125.0, 0.0, a) * s;\n"
88
" } else if (x16 < 15.0) {\n"
89
" return vec4(200.0, 50.0, 100.0, a) * s;\n"
90
" } else {\n"
91
" return vec4(175.0, 50.0, 75.0, a) * s;\n"
92
" }\n"
93
"}\n"
);
94
}
95
};
96
97
}
// namespace IDL
98
}
// namespace colormap
colormap::Colormap
Definition:
colormap.h:17
colormap::Color::g
double g
Definition:
colormap.h:14
c
constexpr T c
Definition:
UnscentedKalmanFilterTest.cpp:46
colormap::IDL::Rainbow18::getCategory
std::string getCategory() const override
Definition:
Rainbow_18.h:48
colormap::Colormap::vec4
Definition:
colormap.h:33
colormap::IDL::Rainbow18
Definition:
Rainbow_18.h:13
Color
uint32_t Color
RGBA color.
Definition:
color.h:8
colormap::IDL::Rainbow18::getColor
Color getColor(double x) const override
Definition:
Rainbow_18.h:29
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:51
colormap::IDL::Rainbow18::getSource
std::string getSource() const override
Definition:
Rainbow_18.h:54
colormap::Color
Definition:
colormap.h:12
colormap::IDL::Rainbow18::getTitle
std::string getTitle() const override
Definition:
Rainbow_18.h:42
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:146
min
T min(T t1, T t2)
Definition:
gdiam.h:44
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:27
VisionX
components
pointcloud_processor
DenseCRFSegmentationProcessor
include
colormap
private
IDL
Rainbow_18.h
Generated by
1.8.17