NNC: Made nnc's folllow cell filters

This commit is contained in:
Jacob Støren 2013-12-18 10:15:35 +01:00
parent 55fe73c3b2
commit 6d1db22cd8
2 changed files with 18 additions and 3 deletions

View File

@ -80,6 +80,7 @@ void RivFaultPartMgr::setCellVisibility(cvf::UByteArray* cellVisibilities)
{
m_nativeFaultGenerator->setCellVisibility(cellVisibilities);
m_oppositeFaultGenerator->setCellVisibility(cellVisibilities);
m_NNCGenerator->setCellVisibility(cellVisibilities, m_grid.p());
generatePartGeometry();
}

View File

@ -93,9 +93,23 @@ void RivNNCGeometryGenerator::computeArrays()
bool isVisible = true;
if (isVisibilityCalcActive)
{
size_t cell1GridLocalIdx = (*allCells)[conn.m_c1GlobIdx].cellIndex();
size_t cell2GridLocalIdx = (*allCells)[conn.m_c1GlobIdx].cellIndex();
isVisible = ((*m_cellVisibility)[cell1GridLocalIdx] || (*m_cellVisibility)[cell2GridLocalIdx]);
bool cell1Visible = false;
bool cell2Visible = false;
if ((*allCells)[conn.m_c1GlobIdx].hostGrid() == m_grid.p())
{
size_t cell1GridLocalIdx = (*allCells)[conn.m_c1GlobIdx].cellIndex();
cell1Visible = (*m_cellVisibility)[cell1GridLocalIdx];
}
if ((*allCells)[conn.m_c2GlobIdx].hostGrid() == m_grid.p())
{
size_t cell2GridLocalIdx = (*allCells)[conn.m_c2GlobIdx].cellIndex();
cell2Visible = (*m_cellVisibility)[cell2GridLocalIdx];
}
isVisible = cell1Visible || cell2Visible;
}
if (isVisible)