Created StructGrid...ToCellFaceMapper

Done to start refactoring to pave way for many new combined result
properties
This commit is contained in:
Jacob Støren
2014-06-24 17:19:30 +02:00
committed by Magne Sjaastad
parent 549e61af77
commit 710395bb85
11 changed files with 203 additions and 230 deletions

View File

@@ -274,10 +274,10 @@ void RiuViewer::mouseReleaseEvent(QMouseEvent* event)
const RivSourceInfo* rivSourceInfo = dynamic_cast<const RivSourceInfo*>(firstHitPart->sourceInfo());
if (rivSourceInfo)
{
if (rivSourceInfo->hasCellIndices())
if (rivSourceInfo->hasCellFaceMapping())
{
m_currentGridIdx = firstHitPart->id();
m_currentCellIndex = rivSourceInfo->m_cellIndices->get(faceIndex);
m_currentCellIndex = rivSourceInfo->m_cellFaceFromTriangleMapper->cellIndex(faceIndex);
QMenu menu;
menu.addAction(QString("I-slice range filter"), this, SLOT(slotRangeFilterI()));
@@ -436,13 +436,14 @@ void RiuViewer::handlePickAction(int winPosX, int winPosY)
const RivSourceInfo* rivSourceInfo = dynamic_cast<const RivSourceInfo*>(firstHitPart->sourceInfo());
if (rivSourceInfo)
{
if (rivSourceInfo->hasCellIndices())
if (rivSourceInfo->hasCellFaceMapping())
{
size_t cellIndex = cvf::UNDEFINED_SIZE_T;
cellIndex = rivSourceInfo->m_cellIndices->get(faceIndex);
CVF_ASSERT(rivSourceInfo->m_cellFaceFromTriangleMapper.notNull());
CVF_ASSERT(rivSourceInfo->m_faceTypes.notNull());
cvf::StructGridInterface::FaceType face = rivSourceInfo->m_faceTypes->get(faceIndex);
size_t cellIndex = cvf::UNDEFINED_SIZE_T;
cellIndex = rivSourceInfo->m_cellFaceFromTriangleMapper->cellIndex(faceIndex);
cvf::StructGridInterface::FaceType face = rivSourceInfo->m_cellFaceFromTriangleMapper->cellFace(faceIndex);
m_reservoirView->pickInfo(gridIndex, cellIndex, face, localIntersectionPoint, &pickInfo);