mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3591 Improve edges on contour map.
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
|
||||
#include "RivScalarMapperUtils.h"
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
@@ -41,14 +39,14 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivScalarMapperUtils::applyTextureResultsToPart(cvf::Part* part, cvf::Vec2fArray* textureCoords, const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting)
|
||||
void RivScalarMapperUtils::applyTextureResultsToPart(cvf::Part* part, cvf::Vec2fArray* textureCoords, const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting, const cvf::Color3f& undefColor)
|
||||
{
|
||||
CVF_ASSERT(part && textureCoords && mapper);
|
||||
|
||||
cvf::DrawableGeo* dg = dynamic_cast<cvf::DrawableGeo*>(part->drawable());
|
||||
if (dg) dg->setTextureCoordArray(textureCoords);
|
||||
|
||||
cvf::ref<cvf::Effect> scalarEffect = RivScalarMapperUtils::createScalarMapperEffect(mapper, opacityLevel, faceCulling, disableLighting);
|
||||
cvf::ref<cvf::Effect> scalarEffect = RivScalarMapperUtils::createScalarMapperEffect(mapper, opacityLevel, faceCulling, disableLighting, undefColor);
|
||||
part->setEffect(scalarEffect.p());
|
||||
}
|
||||
|
||||
@@ -122,7 +120,7 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createCellEdgeEffect(cvf::DrawableGe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::Effect> RivScalarMapperUtils::createScalarMapperEffect(const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting)
|
||||
cvf::ref<cvf::Effect> RivScalarMapperUtils::createScalarMapperEffect(const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting, const cvf::Color3f& undefColor)
|
||||
{
|
||||
CVF_ASSERT(mapper);
|
||||
|
||||
@@ -130,7 +128,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.setUndefinedColor(undefColor);
|
||||
scalarEffgen.disableLighting(disableLighting);
|
||||
|
||||
cvf::ref<cvf::Effect> scalarEffect = scalarEffgen.generateCachedEffect();
|
||||
|
||||
Reference in New Issue
Block a user