mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/dev' into dev-Summer2014
This commit is contained in:
@@ -138,10 +138,12 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dataAccessObject.notNull())
|
||||
if (dataAccessObject.isNull())
|
||||
{
|
||||
m_nativeFaultGenerator->textureCoordinates(m_nativeFaultFacesTextureCoords.p(), dataAccessObject.p(), mapper);
|
||||
return;
|
||||
}
|
||||
m_nativeFaultGenerator->textureCoordinates(m_nativeFaultFacesTextureCoords.p(), dataAccessObject.p(), mapper);
|
||||
|
||||
}
|
||||
|
||||
if (m_opacityLevel < 1.0f )
|
||||
@@ -209,10 +211,12 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dataAccessObject.notNull())
|
||||
if (dataAccessObject.isNull())
|
||||
{
|
||||
m_oppositeFaultGenerator->textureCoordinates(m_oppositeFaultFacesTextureCoords.p(), dataAccessObject.p(), mapper);
|
||||
return;
|
||||
}
|
||||
|
||||
m_oppositeFaultGenerator->textureCoordinates(m_oppositeFaultFacesTextureCoords.p(), dataAccessObject.p(), mapper);
|
||||
}
|
||||
|
||||
if (m_opacityLevel < 1.0f )
|
||||
@@ -272,15 +276,15 @@ void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimResultS
|
||||
|
||||
}
|
||||
|
||||
const int priFaultGeo = 1;
|
||||
const int priNncGeo = 2;
|
||||
const int priMesh = 3;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFaultPartMgr::generatePartGeometry()
|
||||
{
|
||||
const int priFaultGeo = 1;
|
||||
const int priNncGeo = 2;
|
||||
const int priMesh = 3;
|
||||
|
||||
bool useBufferObjects = true;
|
||||
// Surface geometry
|
||||
@@ -465,13 +469,20 @@ void RivFaultPartMgr::updatePartEffect()
|
||||
|
||||
if (m_opacityLevel < 1.0f)
|
||||
{
|
||||
// Must be fixed since currently fault drawing relies on internal priorities of the parts
|
||||
CVF_FAIL_MSG("Not implemented");
|
||||
|
||||
// Set priority to make sure this transparent geometry are rendered last
|
||||
if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(100);
|
||||
if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(100);
|
||||
if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(100);
|
||||
if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(100 + priFaultGeo);
|
||||
if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(100 + priFaultGeo);
|
||||
if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(100 + priNncGeo);
|
||||
|
||||
if (m_nativeFaultGridLines.notNull())
|
||||
{
|
||||
m_nativeFaultGridLines->setPriority(100 + priMesh);
|
||||
}
|
||||
|
||||
if (m_oppositeFaultGridLines.notNull())
|
||||
{
|
||||
m_oppositeFaultGridLines->setPriority(100 + priMesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
void setCellVisibility(cvf::UByteArray* cellVisibilities);
|
||||
|
||||
void applySingleColorEffect();
|
||||
void setOpacityLevel(float opacity) { m_opacityLevel = opacity; }
|
||||
void updateCellResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot);
|
||||
void updateCellEdgeResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot, RimCellEdgeResultSlot* cellEdgeResultSlot);
|
||||
|
||||
|
||||
@@ -233,3 +233,14 @@ void RivReservoirFaultsPartMgr::setFaultForceVisibility(bool forceVisibility)
|
||||
m_forceVisibility = forceVisibility;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::setOpacityLevel(float opacity)
|
||||
{
|
||||
for (size_t i = 0; i < m_faultParts.size(); i++)
|
||||
{
|
||||
m_faultParts[i]->setOpacityLevel(opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
void setCellVisibility(cvf::UByteArray* cellVisibilities);
|
||||
void setFaultForceVisibility(bool isFilterGenerated);
|
||||
|
||||
void setOpacityLevel(float opacity);
|
||||
void applySingleColorEffect();
|
||||
void updateColors(size_t timeStepIndex, RimResultSlot* cellResultSlot);
|
||||
void updateCellEdgeResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot,
|
||||
|
||||
@@ -41,8 +41,11 @@ void RivReservoirPartMgr::clearAndSetReservoir(const RigCaseData* eclipseCase, c
|
||||
m_allGrids.push_back(new RivGridPartMgr(grids[i], i, faultCollection));
|
||||
}
|
||||
|
||||
// Faults read from file are present only on main grid
|
||||
m_faultsPartMgr = new RivReservoirFaultsPartMgr(eclipseCase->mainGrid(), faultCollection);
|
||||
if (eclipseCase->mainGrid())
|
||||
{
|
||||
// Faults read from file are present only on main grid
|
||||
m_faultsPartMgr = new RivReservoirFaultsPartMgr(eclipseCase->mainGrid(), faultCollection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +101,7 @@ void RivReservoirPartMgr::updateCellColor(cvf::Color4f color)
|
||||
|
||||
if (m_faultsPartMgr.notNull())
|
||||
{
|
||||
m_faultsPartMgr->setOpacityLevel(color.a());
|
||||
m_faultsPartMgr->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user