mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#266) Added interface for all/activeCellsBoundingBox and displayModelOffset
This commit is contained in:
@@ -356,6 +356,51 @@ void RimEclipseCase::setReservoirData(RigCaseData* eclipseCase)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimEclipseCase::activeCellsBoundingBox() const
|
||||
{
|
||||
if (m_rigEclipseCase.notNull() && m_rigEclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS))
|
||||
{
|
||||
return m_rigEclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->geometryBoundingBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
return cvf::BoundingBox();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimEclipseCase::allCellsBoundingBox() const
|
||||
{
|
||||
if (m_rigEclipseCase.notNull() && m_rigEclipseCase->mainGrid())
|
||||
{
|
||||
return m_rigEclipseCase->mainGrid()->boundingBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
return cvf::BoundingBox();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RimEclipseCase::displayModelOffset() const
|
||||
{
|
||||
if (m_rigEclipseCase.notNull() && m_rigEclipseCase->mainGrid())
|
||||
{
|
||||
return m_rigEclipseCase->mainGrid()->displayModelOffset();
|
||||
}
|
||||
else
|
||||
{
|
||||
return cvf::Vec3d::ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -468,4 +513,4 @@ QString RimEclipseCase::timeStepName(int frameIdx)
|
||||
QDateTime date = results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDate(0,frameIdx);
|
||||
return date.toString(m_timeStepFormatString);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user