#254 Show fault colors in combination with cell edge colors

This commit is contained in:
Magne Sjaastad
2016-08-01 17:16:55 +02:00
parent 6749d2ed37
commit 5090eddf44
3 changed files with 23 additions and 6 deletions

View File

@@ -90,11 +90,22 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createCellEdgeEffect(cvf::DrawableGe
}
else
{
RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors,
quadToCellFaceMapper, dg, gridIndex, opacityLevel);
bool useDefaultValueForHugeVals = false;
if (!cellResultColors->hasResult())
{
useDefaultValueForHugeVals = true;
}
cvf::ScalarMapper* cellScalarMapper = cellResultColors->legendConfig()->scalarMapper();
cellFaceEffectGen.setScalarMapper(cellScalarMapper);
RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors,
quadToCellFaceMapper, dg, gridIndex, useDefaultValueForHugeVals, opacityLevel);
if (cellResultColors->hasResult())
{
// If no scalar mapper is set for the effect, a default color is used to fill the texture
// This is what we want when the fault colors should be visible in combination with cell edge
cvf::ScalarMapper* cellScalarMapper = cellResultColors->legendConfig()->scalarMapper();
cellFaceEffectGen.setScalarMapper(cellScalarMapper);
}
}
cellFaceEffectGen.setOpacityLevel(opacityLevel);