mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#166) Improvements to ternary result visualization
Show undefined in regions with no results Always use time step zero for static results Allow texture coordinate creation without using RigPipeInCellEvaluator
This commit is contained in:
@@ -47,26 +47,6 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
CVF_ASSERT(quadMapper);
|
||||
m_quadMapper = quadMapper;
|
||||
|
||||
initData(cellResultColors, ternaryLegendConfig, timeStepIndex, gridIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimTernaryLegendConfig* ternaryLegendConfig,
|
||||
size_t timeStepIndex)
|
||||
: m_quadMapper(NULL)
|
||||
{
|
||||
initData(cellResultColors, ternaryLegendConfig, timeStepIndex, 0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivTernaryTextureCoordsCreator::initData(RimEclipseCellColors* cellResultColors, RimTernaryLegendConfig* ternaryLegendConfig, size_t timeStepIndex, size_t gridIndex)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
size_t resTimeStepIdx = timeStepIndex;
|
||||
@@ -91,6 +71,38 @@ void RivTernaryTextureCoordsCreator::initData(RimEclipseCellColors* cellResultCo
|
||||
CVF_ASSERT(m_texMapper.notNull());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimTernaryLegendConfig* ternaryLegendConfig,
|
||||
size_t timeStepIndex)
|
||||
: m_quadMapper(NULL)
|
||||
{
|
||||
RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData();
|
||||
|
||||
size_t resTimeStepIdx = timeStepIndex;
|
||||
|
||||
if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||
|
||||
size_t gridIndex = 0;
|
||||
cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL");
|
||||
cvf::ref<RigResultAccessor> sgas = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS");
|
||||
cvf::ref<RigResultAccessor> swat = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SWAT");
|
||||
|
||||
m_resultAccessor = new RigTernaryResultAccessor();
|
||||
m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p());
|
||||
|
||||
const RivTernaryScalarMapper* mapper = ternaryLegendConfig->scalarMapper();
|
||||
|
||||
// Create a texture mapper without detecting transparency using RigPipeInCellEvaluator
|
||||
m_texMapper = new RivTernaryResultToTextureMapper(mapper, NULL);
|
||||
CVF_ASSERT(m_texMapper.notNull());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user