Color.cpp
Go to the documentation of this file.
1 
28 #include "lvr2/display/Color.hpp"
29 
30 namespace lvr2
31 {
32 
33 float Colors::PrimeColorTable[][3] = {
34  { 0.80, 0.00, 0.00}, // Red 3
35  { 0.12, 0.80, 0.12}, // Lime Green
36  { 0.00, 0.00, 0.50}, // Navy Blue
37  { 0.93, 0.93, 0.00}, // Yellow 2
38  { 0.92, 0.23, 0.55}, // Violet Red 2
39  { 1.00, 0.73, 0.06}, // Dark Golden Rod 1
40  { 0.09, 0.45, 0.80}, // Dodger Blue 3
41  { 0.50, 0.50, 0.50}, // Grey
42  { 0.00, 0.00, 0.00}, // Black
43  { 1.00, 1.00, 1.00} // White
44 };
45 
46 float Colors::LightColorTable[][3] = {
47  { 1.00, 0.00, 0.00}, // Red
48  { 0.00, 1.00, 0.00}, // Green
49  { 0.69, 0.40, 1.00}, // Royal Blue
50  { 1.00, 1.00, 0.00}, // Yellow
51  { 0.93, 0.47, 0.62}, // Pale Violet Red 2
52  { 1.00, 0.65, 0.00}, // Orange
53  { 0.00, 0.75, 1.00}, // Deep Sky Blue 1
54  { 0.75, 0.75, 0.75}, // Grey
55  { 0.05, 0.05, 0.05}, // Black
56  { 0.90, 0.90, 0.90} // White
57 };
58 
59 float Colors::HighlightColorTable[][3] = {
60  { 1.00, 0.42, 0.42}, // Indian Red 2
61  { 0.33, 1.00, 0.62}, // Sea Green 1
62  { 0.42, 0.65, 0.83}, // Sky Blue 3
63  { 1.00, 0.96, 0.56}, // Khaki 1
64  { 1.00, 0.71, 0.76}, // Light Pink
65  { 1.00, 0.93, 0.55}, // Light Golden Rod 2
66  { 0.75, 0.94, 1.00}, // Light Blue 1
67  { 0.95, 0.95, 0.95}, // Grey
68  { 0.10, 0.10, 0.10}, // Black
69  { 0.95, 0.95, 0.95} // White
70 };
71 
72 void Colors::getColor(float* c, Color name, ColorTable table)
73 {
74  switch(table)
75  {
76  default:
77  case BASIC:
78  c[0] = PrimeColorTable[name][0];
79  c[1] = PrimeColorTable[name][1];
80  c[2] = PrimeColorTable[name][2];
81  break;
82  case LIGHT:
83  c[0] = LightColorTable[name][0];
84  c[1] = LightColorTable[name][1];
85  c[2] = LightColorTable[name][2];
86  break;
87  case HIGHLIGHT:
88  c[0] = HighlightColorTable[name][0];
89  c[1] = HighlightColorTable[name][1];
90  c[2] = HighlightColorTable[name][2];
91  break;
92  }
93 }
94 
95 } // namespace lvr2
lvr2::HIGHLIGHT
@ HIGHLIGHT
Definition: Color.hpp:43
lvr2::Colors::LightColorTable
static float LightColorTable[][3]
Definition: Color.hpp:50
lvr2::BASIC
@ BASIC
Definition: Color.hpp:43
lvr2::Colors::PrimeColorTable
static float PrimeColorTable[][3]
Definition: Color.hpp:49
lvr2::Colors::HighlightColorTable
static float HighlightColorTable[][3]
Definition: Color.hpp:51
lvr2::Colors::getColor
static void getColor(float *c, Color name, ColorTable table=BASIC)
Definition: Color.cpp:72
lvr2::ColorTable
ColorTable
Definition: Color.hpp:43
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::Color
Color
Definition: Color.hpp:41
Color.hpp
lvr2::LIGHT
@ LIGHT
Definition: Color.hpp:43


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23