mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
RiaColorTables : Add and use undefinedCellColor()
This commit is contained in:
parent
9a420183e1
commit
348b492cc1
@ -451,3 +451,11 @@ const caf::ColorTable& RiaColorTables::timestepsPaletteColors()
|
||||
|
||||
return colorTable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTables::undefinedCellColor()
|
||||
{
|
||||
return cvf::Color3::GRAY;
|
||||
}
|
||||
|
@ -51,4 +51,5 @@ public:
|
||||
static const caf::ColorTable& selectionPaletteColors();
|
||||
static const caf::ColorTable& timestepsPaletteColors();
|
||||
|
||||
static cvf::Color3f undefinedCellColor();
|
||||
};
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "RivScalarMapperUtils.h"
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -128,6 +130,7 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createScalarMapperEffect(const cvf::
|
||||
caf::ScalarMapperEffectGenerator scalarEffgen(mapper, polygonOffset);
|
||||
scalarEffgen.setOpacityLevel(opacityLevel);
|
||||
scalarEffgen.setFaceCulling(faceCulling);
|
||||
scalarEffgen.setUndefinedColor(RiaColorTables::undefinedCellColor());
|
||||
scalarEffgen.disableLighting(disableLighting);
|
||||
|
||||
cvf::ref<cvf::Effect> scalarEffect = scalarEffgen.generateCachedEffect();
|
||||
@ -146,7 +149,9 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createTernaryScalarMapperEffect(cons
|
||||
RivTernaryScalarMapperEffectGenerator scalarEffgen(mapper, polygonOffset);
|
||||
scalarEffgen.setOpacityLevel(opacityLevel);
|
||||
scalarEffgen.setFaceCulling(faceCulling);
|
||||
scalarEffgen.setUndefinedColor(RiaColorTables::undefinedCellColor());
|
||||
scalarEffgen.disableLighting(disableLighting);
|
||||
|
||||
cvf::ref<cvf::Effect> scalarEffect = scalarEffgen.generateCachedEffect();
|
||||
|
||||
return scalarEffect;
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "RivTernaryScalarMapperEffectGenerator.h"
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RivTernaryScalarMapper.h"
|
||||
|
||||
#include "cvfRenderStateBlending.h"
|
||||
@ -48,7 +50,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivTernaryScalarMapperEffectGenerator::RivTernaryScalarMapperEffectGenerator(const RivTernaryScalarMapper* scalarMapper, caf::PolygonOffset polygonOffset)
|
||||
: m_undefinedColor(cvf::Color3::GRAY)
|
||||
: m_undefinedColor(RiaColorTables::undefinedCellColor())
|
||||
{
|
||||
m_scalarMapper = scalarMapper;
|
||||
m_polygonOffset = polygonOffset;
|
||||
|
@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RigCellGeometryTools.h"
|
||||
#include "RigFractureCell.h"
|
||||
@ -289,7 +290,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc
|
||||
|
||||
if (legendConfig && legendConfig->scalarMapper())
|
||||
{
|
||||
cvf::Color3ub resultColor = cvf::Color3ub(cvf::Color3::LIGHT_GRAY);
|
||||
cvf::Color3ub resultColor = cvf::Color3ub(RiaColorTables::undefinedCellColor());
|
||||
|
||||
if (activeView.stimPlanColors->resultName().startsWith("CONDUCTIVITY", Qt::CaseInsensitive))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "RimEclipseView.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
@ -851,10 +852,10 @@ void RimEclipseView::updateStaticCellColors(RivCellSetEnum geometryType)
|
||||
color = cvf::Color4f(cvf::Color3f(cvf::Color3::BROWN), opacity ); break;
|
||||
case VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER:
|
||||
color = cvf::Color4f(cvf::Color3::ORANGE); break;
|
||||
case INACTIVE: color = cvf::Color4f(cvf::Color3::LIGHT_GRAY); break;
|
||||
case INACTIVE: color = cvf::Color4f(RiaColorTables::undefinedCellColor()); break;
|
||||
case RANGE_FILTERED: color = cvf::Color4f(cvf::Color3::ORANGE); break;
|
||||
case RANGE_FILTERED_WELL_CELLS: color = cvf::Color4f(cvf::Color3f(cvf::Color3::BROWN), opacity ); break;
|
||||
case RANGE_FILTERED_INACTIVE: color = cvf::Color4f(cvf::Color3::LIGHT_GRAY); break;
|
||||
case RANGE_FILTERED_INACTIVE: color = cvf::Color4f(RiaColorTables::undefinedCellColor()); break;
|
||||
}
|
||||
|
||||
if (geometryType == PROPERTY_FILTERED || geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimViewLinker.h"
|
||||
@ -89,7 +90,7 @@ RimTernaryLegendConfig::RimTernaryLegendConfig()
|
||||
m_localAutoMin.resize(3, 0.0);
|
||||
m_localAutoMax.resize(3, 1.0);
|
||||
|
||||
m_scalarMapper = new RivTernaryScalarMapper(cvf::Color3f::GRAY);
|
||||
m_scalarMapper = new RivTernaryScalarMapper(RiaColorTables::undefinedCellColor());
|
||||
|
||||
recreateLegend();
|
||||
updateLegend();
|
||||
|
Loading…
Reference in New Issue
Block a user