mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3943 Stop regenerating map geometry when altering other geometry.
* Do this by caching results and clearing the cache in three stages with each dependent on the previous stages: 1. Grid Mapping 2. Results 3. Geometry * Clearing grid mapping clears results and clearing results clears geometry. * Some operations require only geometry changes, while others require a full change to grid mapping and consequently everything else.
This commit is contained in:
@@ -41,9 +41,10 @@ RivContourMapProjectionPartMgr::RivContourMapProjectionPartMgr(RimContourMapProj
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivContourMapProjectionPartMgr::createProjectionGeometry()
|
||||
{
|
||||
m_contourMapProjection->generateContourPolygons();
|
||||
m_contourMapProjection->generateGeometryIfNecessary();
|
||||
|
||||
m_contourLinePolygons = m_contourMapProjection->contourPolygons();
|
||||
m_contourMapTriangles = m_contourMapProjection->generateTrianglesWithVertexValues();
|
||||
m_contourMapTriangles = m_contourMapProjection->trianglesWithVertexValues();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -343,7 +344,10 @@ std::vector<std::vector<cvf::ref<cvf::Drawable>>> RivContourMapProjectionPartMgr
|
||||
geo->setVertexArray(vertexArray.p());
|
||||
contourDrawables.push_back(geo);
|
||||
}
|
||||
contourDrawablesForAllLevels[i] = contourDrawables;
|
||||
if (!contourDrawables.empty())
|
||||
{
|
||||
contourDrawablesForAllLevels[i] = contourDrawables;
|
||||
}
|
||||
}
|
||||
return contourDrawablesForAllLevels;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user