RiaColorTables : Add and use undefinedCellColor()

This commit is contained in:
Magne Sjaastad
2018-01-22 11:18:45 +01:00
parent 9a420183e1
commit 348b492cc1
7 changed files with 24 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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))
{