@@ -46,65 +46,6 @@ static const char V_BLENDWITHMATERIAL[] = "blend_with_material";
4646using namespace vrui ;
4747using namespace opencover ;
4848
49- // namespace opencover
50- // {
51-
52- // opencover::ColorMap interpolateColorMap(const opencover::ColorMap &cm)
53- // {
54- // if(cm.steps() == cm.r.size())
55- // return cm;
56- // int numSteps = cm.steps;
57- // opencover::ColorMap interpolatedMap = cm;
58- // interpolatedMap.r.resize(numSteps);
59- // interpolatedMap.g.resize(numSteps);
60- // interpolatedMap.b.resize(numSteps);
61- // interpolatedMap.a.resize(numSteps);
62- // interpolatedMap.samplingPoints.resize(numSteps);
63-
64- // auto numColors = cm.samplingPoints.size();
65- // double delta = 1.0 / (numSteps - 1);
66- // int idx = 0;
67-
68- // for (int i = 0; i < numSteps - 1; i++)
69- // {
70- // double x = i * delta;
71- // while (cm.samplingPoints[idx + 1] <= x)
72- // {
73- // idx++;
74- // if (idx > numColors - 2)
75- // {
76- // idx = numColors - 2;
77- // break;
78- // }
79- // }
80-
81- // double d = (x - cm.samplingPoints[idx]) / (cm.samplingPoints[idx + 1] - cm.samplingPoints[idx]);
82- // interpolatedMap.r[i] = static_cast<float>((1 - d) * cm.r[idx] + d * cm.r[idx + 1]);
83- // interpolatedMap.g[i] = static_cast<float>((1 - d) * cm.g[idx] + d * cm.g[idx + 1]);
84- // interpolatedMap.b[i] = static_cast<float>((1 - d) * cm.b[idx] + d * cm.b[idx + 1]);
85- // interpolatedMap.a[i] = static_cast<float>((1 - d) * cm.a[idx] + d * cm.a[idx + 1]);
86- // interpolatedMap.samplingPoints[i] = static_cast<float>(i) / (numSteps - 1);
87- // }
88-
89- // interpolatedMap.r[numSteps - 1] = cm.r[numColors - 1];
90- // interpolatedMap.g[numSteps - 1] = cm.g[numColors - 1];
91- // interpolatedMap.b[numSteps - 1] = cm.b[numColors - 1];
92- // interpolatedMap.a[numSteps - 1] = cm.a[numColors - 1];
93- // interpolatedMap.samplingPoints[numSteps - 1] = 1.0f;
94-
95- // interpolatedMap.steps = numSteps;
96-
97- // return interpolatedMap;
98- // }
99-
100- // ColorBar::ColorBar(ui::Menu *menu)
101- // : ui::Owner(std::string("ColorBar"), menu)
102- // , colorsMenu_(menu)
103- // , map_(menu->name())
104- // {
105- // init();
106- // }
107-
10849ColorBar::ColorBar (ui::Group *group)
10950: ui::Owner(std::string(" ColorBar" ), group)
11051, colorsMenu_(group)
@@ -476,7 +417,7 @@ void ColorBar::show(bool state)
476417 {
477418 if (!hudbar_)
478419 {
479- hudbar_ = std::make_unique<coColorBar>(name_, map_);
420+ hudbar_ = std::make_unique<coColorBar>(name_, map_, false );
480421 hudbar_->getUIElement ()->createGeometry ();
481422 }
482423 auto vtr = hudbar_->getUIElement ()->getDCS ();
0 commit comments