Use global color interpolation.

Now every place uses the globally defined colors rather than specific
colors whenever needed. Next: make those colors configurable.
This commit is contained in:
2018-05-03 13:33:02 +02:00
parent b820bb407f
commit d0c888024d
9 changed files with 57 additions and 76 deletions

View File

@@ -43,7 +43,7 @@ LabelVisualisation::LabelVisualisation(const std::vector<float> &positions, cons
continue;
}
colorBuffer.emplace_back(Color{1 - prevData[i] / maxVal, 1 - prevData[i] / maxVal, 1});
colorBuffer.emplace_back(interpolate(prevData[i] / maxVal, POSITIVE_COLOR, NEUTRAL_COLOR));
std::copy_n(positions.begin() + 3 * i, 3, nodeInserter);
nodeLabels.emplace_back(labels[i]);
}