mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#657) Wired up UI to viz model generation for cross sections
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "RimCrossSectionCollection.h"
|
||||
|
||||
#include "RimCrossSection.h"
|
||||
#include "RivCrossSectionPartMgr.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimCrossSectionCollection, "CrossSectionCollection");
|
||||
@@ -45,3 +46,43 @@ caf::PdmFieldHandle* RimCrossSectionCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::applySingleColorEffect()
|
||||
{
|
||||
for (size_t csIdx = 0; csIdx < crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = crossSections[csIdx];
|
||||
cs->crossSectionPartMgr()->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::updateCellResultColor(size_t timeStepIndex, RimEclipseCellColors* cellResultColors)
|
||||
{
|
||||
for (size_t csIdx = 0; csIdx < crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = crossSections[csIdx];
|
||||
cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex, cellResultColors);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform)
|
||||
{
|
||||
for (size_t csIdx = 0; csIdx < crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = crossSections[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->crossSectionPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform);
|
||||
cs->crossSectionPartMgr()->appendMeshLinePartsToModel(model, scaleTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user