mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Implemented #310 Result info when picking
This included some refactorization to remove the command stuff out of RiuViewer, and to communicate the grid index via the source info struct, and not as a cvfPart::id
This commit is contained in:
@@ -236,11 +236,10 @@ void RivFaultPartMgr::generatePartGeometry()
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setName("Grid " + cvf::String(static_cast<int>(m_grid->gridIndex())));
|
||||
part->setId(m_grid->gridIndex()); // !! For now, use grid index as part ID (needed for pick info)
|
||||
part->setDrawable(geo.p());
|
||||
|
||||
// Set mapping from triangle face index to cell index
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo;
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo(m_grid->gridIndex());
|
||||
si->m_cellFaceFromTriangleMapper = m_nativeFaultGenerator->triangleToCellFaceMapper();
|
||||
part->setSourceInfo(si.p());
|
||||
|
||||
@@ -289,11 +288,10 @@ void RivFaultPartMgr::generatePartGeometry()
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setName("Grid " + cvf::String(static_cast<int>(m_grid->gridIndex())));
|
||||
part->setId(m_grid->gridIndex()); // !! For now, use grid index as part ID (needed for pick info)
|
||||
part->setDrawable(geo.p());
|
||||
|
||||
// Set mapping from triangle face index to cell index
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo;
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo(m_grid->gridIndex());
|
||||
si->m_cellFaceFromTriangleMapper = m_oppositeFaultGenerator->triangleToCellFaceMapper();
|
||||
part->setSourceInfo(si.p());
|
||||
|
||||
@@ -340,11 +338,10 @@ void RivFaultPartMgr::generatePartGeometry()
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setName("NNC in Fault. Grid " + cvf::String(static_cast<int>(m_grid->gridIndex())));
|
||||
part->setId(m_grid->gridIndex()); // !! For now, use grid index as part ID (needed for pick info)
|
||||
part->setDrawable(geo.p());
|
||||
|
||||
// Set mapping from triangle face index to cell index
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo;
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo(m_grid->gridIndex());;
|
||||
si->m_NNCIndices = m_NNCGenerator->triangleToNNCIndex().p();
|
||||
part->setSourceInfo(si.p());
|
||||
|
||||
|
||||
@@ -120,12 +120,11 @@ void RivGridPartMgr::generatePartGeometry(cvf::StructGridGeometryGenerator& geoB
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setName("Grid " + cvf::String(static_cast<int>(m_gridIdx)));
|
||||
part->setId(m_gridIdx); // !! For now, use grid index as part ID (needed for pick info)
|
||||
part->setDrawable(geo.p());
|
||||
part->setTransform(m_scaleTransform.p());
|
||||
|
||||
// Set mapping from triangle face index to cell index
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo;
|
||||
cvf::ref<RivSourceInfo> si = new RivSourceInfo(m_gridIdx);
|
||||
si->m_cellFaceFromTriangleMapper = geoBuilder.triangleToCellFaceMapper();
|
||||
|
||||
part->setSourceInfo(si.p());
|
||||
|
||||
@@ -27,10 +27,15 @@
|
||||
class RivSourceInfo : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RivSourceInfo(size_t gridIndex) : m_gridIndex(gridIndex) {}
|
||||
|
||||
size_t gridIndex() const { return m_gridIndex; }
|
||||
bool hasCellFaceMapping() const;
|
||||
bool hasNNCIndices() const;
|
||||
|
||||
public:
|
||||
cvf::cref<cvf::StuctGridTriangleToCellFaceMapper> m_cellFaceFromTriangleMapper;
|
||||
cvf::ref<cvf::Array<size_t> > m_NNCIndices;
|
||||
private:
|
||||
size_t m_gridIndex;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user