mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2635 3D well log curves: Give new curves different colors
This commit is contained in:
parent
7024ee045c
commit
73a08fffc4
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include "Riv3dWellLogPlanePartMgr.h"
|
#include "Riv3dWellLogPlanePartMgr.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
|
|
||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
#include "Rim3dWellLogCurveCollection.h"
|
#include "Rim3dWellLogCurveCollection.h"
|
||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
@ -93,8 +95,11 @@ void Riv3dWellLogPlanePartMgr::append3dWellLogCurvesToModel(cvf::ModelBasicList*
|
|||||||
const Rim3dWellLogCurveCollection* curveCollection = m_wellPath->rim3dWellLogCurveCollection();
|
const Rim3dWellLogCurveCollection* curveCollection = m_wellPath->rim3dWellLogCurveCollection();
|
||||||
Rim3dWellLogCurveCollection::PlanePosition planePosition = curveCollection->planePosition();
|
Rim3dWellLogCurveCollection::PlanePosition planePosition = curveCollection->planePosition();
|
||||||
|
|
||||||
|
size_t colorIndex = 0;
|
||||||
|
|
||||||
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
||||||
{
|
{
|
||||||
|
colorIndex++;
|
||||||
if (!rim3dWellLogCurve->isShowingCurve()) continue;
|
if (!rim3dWellLogCurve->isShowingCurve()) continue;
|
||||||
|
|
||||||
std::vector<double> resultValues;
|
std::vector<double> resultValues;
|
||||||
@ -115,7 +120,8 @@ void Riv3dWellLogPlanePartMgr::append3dWellLogCurvesToModel(cvf::ModelBasicList*
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
caf::MeshEffectGenerator meshEffectGen(cvf::Color3f(0.9f, 0.0f, 0.0f));
|
caf::MeshEffectGenerator meshEffectGen(curveColor(colorIndex));
|
||||||
|
meshEffectGen.setLineWidth(2.0f);
|
||||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
||||||
|
|
||||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||||
@ -193,6 +199,14 @@ double Riv3dWellLogPlanePartMgr::planeWidth() const
|
|||||||
return cellSize * 4;
|
return cellSize * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::Color3f Riv3dWellLogPlanePartMgr::curveColor(size_t index)
|
||||||
|
{
|
||||||
|
return RiaColorTables::wellLogPlotPaletteColors().cycledColor3f(index);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -35,6 +35,7 @@ class Drawable;
|
|||||||
class Effect;
|
class Effect;
|
||||||
class Part;
|
class Part;
|
||||||
class BoundingBox;
|
class BoundingBox;
|
||||||
|
class Color3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
@ -72,6 +73,8 @@ private:
|
|||||||
double wellPathCenterToPlotStartOffset(Rim3dWellLogCurveCollection::PlanePosition planePosition) const;
|
double wellPathCenterToPlotStartOffset(Rim3dWellLogCurveCollection::PlanePosition planePosition) const;
|
||||||
double planeWidth() const;
|
double planeWidth() const;
|
||||||
|
|
||||||
|
cvf::Color3f curveColor(size_t index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::ref<Riv3dWellLogCurveGeometryGenerator> m_3dWellLogCurveGeometryGenerator;
|
cvf::ref<Riv3dWellLogCurveGeometryGenerator> m_3dWellLogCurveGeometryGenerator;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user