mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
parent
24a464ecf9
commit
4c00a48a25
@ -139,6 +139,11 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
m_grid->gridIndex(),
|
||||
m_nativeFaultGenerator->cellFromQuadMapper());
|
||||
|
||||
if (!texturer.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
texturer.createTextureCoords(m_nativeFaultFacesTextureCoords.p());
|
||||
}
|
||||
|
||||
@ -182,6 +187,11 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
m_grid->gridIndex(),
|
||||
m_oppositeFaultGenerator->cellFromQuadMapper());
|
||||
|
||||
if (!texturer.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
texturer.createTextureCoords(m_oppositeFaultFacesTextureCoords.p());
|
||||
}
|
||||
|
||||
|
@ -260,6 +260,10 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
timeStepIndex,
|
||||
m_grid->gridIndex(),
|
||||
m_surfaceGenerator.quadToCellFaceMapper());
|
||||
if (!texturer.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
texturer.createTextureCoords(m_surfaceFacesTextureCoords.p());
|
||||
|
||||
|
@ -45,7 +45,6 @@ RivTextureCoordsCreator::RivTextureCoordsCreator(RimResultSlot* cellResultSlot,
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
|
||||
|
||||
m_resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, cellResultSlot->resultVariable());
|
||||
CVF_ASSERT(m_resultAccessor.notNull());
|
||||
|
||||
cvf::ref<RigPipeInCellEvaluator> pipeInCellEval = new RigPipeInCellEvaluator(cellResultSlot->reservoirView()->wellCollection()->isWellPipesVisible(timeStepIndex),
|
||||
eclipseCase->gridCellToWellIndex(gridIndex));
|
||||
@ -56,6 +55,27 @@ RivTextureCoordsCreator::RivTextureCoordsCreator(RimResultSlot* cellResultSlot,
|
||||
CVF_ASSERT(m_texMapper.notNull());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivTextureCoordsCreator::isValid()
|
||||
{
|
||||
if (m_quadMapper.isNull() || m_resultAccessor.isNull() || m_texMapper.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivTextureCoordsCreator::createTextureCoords(cvf::Vec2fArray* quadTextureCoords)
|
||||
{
|
||||
createTextureCoords(quadTextureCoords, m_quadMapper.p(), m_resultAccessor.p(), m_texMapper.p());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -90,3 +110,4 @@ void RivTextureCoordsCreator::createTextureCoords(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,9 @@ public:
|
||||
size_t gridIndex,
|
||||
const cvf::StructGridQuadToCellFaceMapper* quadMapper);
|
||||
|
||||
void createTextureCoords(cvf::Vec2fArray* quadTextureCoords)
|
||||
{
|
||||
createTextureCoords(quadTextureCoords, m_quadMapper.p(), m_resultAccessor.p(), m_texMapper.p());
|
||||
}
|
||||
bool isValid();
|
||||
|
||||
void createTextureCoords(cvf::Vec2fArray* quadTextureCoords);
|
||||
|
||||
private:
|
||||
|
||||
@ -51,7 +50,6 @@ private:
|
||||
const cvf::StructGridQuadToCellFaceMapper* quadMapper,
|
||||
const RigResultAccessor* resultAccessor,
|
||||
const RivResultToTextureMapper* texMapper);
|
||||
|
||||
cvf::cref<cvf::StructGridQuadToCellFaceMapper> m_quadMapper;
|
||||
cvf::ref<RigResultAccessor> m_resultAccessor;
|
||||
cvf::ref<RivResultToTextureMapper> m_texMapper;
|
||||
|
Loading…
Reference in New Issue
Block a user