Cleanup in EnsembleColormanager

This commit is contained in:
Jacob Støren
2018-05-11 09:24:42 +02:00
parent d1e55c64d3
commit ca30c58a77
3 changed files with 17 additions and 9 deletions

View File

@@ -22,7 +22,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray> RimEnsembleCurveSetColorManager::EnsembleColorRanges(
const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray> RimEnsembleCurveSetColorManager::m_ensembleColorRanges(
{
{ RimRegularLegendConfig::GREEN_RED, cvf::Color3ubArray({ cvf::Color3ub(0x00, 0xff, 0x00), cvf::Color3ub(0xff, 0x00, 0x00) }) },
{ RimRegularLegendConfig::BLUE_MAGENTA, cvf::Color3ubArray({ cvf::Color3ub(0x00, 0x00, 0xff), cvf::Color3ub(0xff, 0x00, 0xff) }) },
@@ -31,6 +31,14 @@ const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray> RimE
{ RimRegularLegendConfig::BLUE_LIGHT_DARK, cvf::Color3ubArray({ cvf::Color3ub(0xcc, 0xcc, 0xff), cvf::Color3ub(0x00, 0x00, 0x99) }) }
});
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray>& RimEnsembleCurveSetColorManager::EnsembleColorRanges()
{
return m_ensembleColorRanges;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -41,9 +49,9 @@ const RimRegularLegendConfig::ColorRangesType RimEnsembleCurveSetColorManager::D
//--------------------------------------------------------------------------------------------------
RimRegularLegendConfig::ColorRangesType RimEnsembleCurveSetColorManager::cycledEnsembleColorRange(int index)
{
size_t modIndex = index % EnsembleColorRanges.size();
size_t modIndex = index % m_ensembleColorRanges.size();
auto crIt = EnsembleColorRanges.begin();
auto crIt = m_ensembleColorRanges.begin();
for (int i = 0; i < modIndex; ++i) ++crIt;
return crIt->first;