mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2094 Update well name color in 3d view (not sim well)
This commit is contained in:
parent
c19bc103c2
commit
93a83cd756
@ -460,6 +460,21 @@ size_t RivWellPathPartMgr::segmentIndexFromTriangleIndex(size_t triangleIndex)
|
|||||||
return m_pipeBranchData.m_pipeGeomGenerator->segmentIndexFromTriangleIndex(triangleIndex);
|
return m_pipeBranchData.m_pipeGeomGenerator->segmentIndexFromTriangleIndex(triangleIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RivWellPathPartMgr::updateWellNameTextColor(cvf::Color3f color)
|
||||||
|
{
|
||||||
|
if (m_wellLabelPart.p())
|
||||||
|
{
|
||||||
|
cvf::DrawableText* drawableText = dynamic_cast<cvf::DrawableText*>(m_wellLabelPart->drawable());
|
||||||
|
if (drawableText)
|
||||||
|
{
|
||||||
|
drawableText->setTextColor(color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -72,6 +72,8 @@ public:
|
|||||||
|
|
||||||
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
|
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
|
||||||
|
|
||||||
|
void updateWellNameTextColor(cvf::Color3f color);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model,
|
void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model,
|
||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
|
@ -462,7 +462,7 @@ void RimEclipseView::createDisplayModel()
|
|||||||
wellPathsPartManager()->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p(), this);
|
wellPathsPartManager()->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p(), this);
|
||||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||||
m_wellPathPipeVizModel->updateBoundingBoxesRecursive();
|
m_wellPathPipeVizModel->updateBoundingBoxesRecursive();
|
||||||
|
m_viewer->updateWellPathTextColor();
|
||||||
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());
|
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());
|
||||||
|
|
||||||
// Create Scenes from the frameModels
|
// Create Scenes from the frameModels
|
||||||
|
@ -698,8 +698,8 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
if (m_viewer != nullptr)
|
if (m_viewer != nullptr)
|
||||||
{
|
{
|
||||||
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
||||||
m_viewer->updateGridBoxData();
|
|
||||||
}
|
}
|
||||||
|
updateGridBoxData();
|
||||||
}
|
}
|
||||||
else if (changedField == &maximumFrameRate)
|
else if (changedField == &maximumFrameRate)
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,9 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
|
#include "RimWellPathCollection.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
#include "RivWellPathPartMgr.h"
|
||||||
|
|
||||||
using cvf::ManipulatorTrackball;
|
using cvf::ManipulatorTrackball;
|
||||||
|
|
||||||
@ -765,6 +768,8 @@ void RiuViewer::updateGridBoxData()
|
|||||||
m_gridBoxGenerator->createGridBoxParts();
|
m_gridBoxGenerator->createGridBoxParts();
|
||||||
|
|
||||||
updateTextAndTickMarkColorForOverlayItems();
|
updateTextAndTickMarkColorForOverlayItems();
|
||||||
|
|
||||||
|
updateWellPathTextColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -776,6 +781,27 @@ cvf::Model* RiuViewer::gridBoxModel() const
|
|||||||
return m_gridBoxGenerator->model();
|
return m_gridBoxGenerator->model();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuViewer::updateWellPathTextColor()
|
||||||
|
{
|
||||||
|
RimView* rimView = ownerReservoirView();
|
||||||
|
if (!rimView) return;
|
||||||
|
|
||||||
|
RimWellPathCollection* wellPathCollection = rimView->wellPathsPartManager();
|
||||||
|
|
||||||
|
if (wellPathCollection)
|
||||||
|
{
|
||||||
|
cvf::Color3f color = computeContrastColor();
|
||||||
|
|
||||||
|
for (RimWellPath* path : wellPathCollection->wellPaths())
|
||||||
|
{
|
||||||
|
path->partMgr()->updateWellNameTextColor(color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -78,6 +78,8 @@ public:
|
|||||||
void updateGridBoxData();
|
void updateGridBoxData();
|
||||||
cvf::Model* gridBoxModel() const;
|
cvf::Model* gridBoxModel() const;
|
||||||
|
|
||||||
|
void updateWellPathTextColor();
|
||||||
|
|
||||||
void showAnimationProgress(bool enable);
|
void showAnimationProgress(bool enable);
|
||||||
|
|
||||||
void removeAllColorLegends();
|
void removeAllColorLegends();
|
||||||
|
Loading…
Reference in New Issue
Block a user