mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make draw plane selection for curves be unrelated to 3d Track (somewhat related to #2825).
* Makes more sense user wise and makes for better code. * Helps refactor code to relate grids to curves so the curves can have access to the grid it is being drawn on. * This will help fix #2825 by being able to project curve points onto the exact triangle geometry.
This commit is contained in:
@@ -47,14 +47,14 @@ Riv3dWellLogCurveGeometryGenerator::Riv3dWellLogCurveGeometryGenerator(RimWellPa
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables(const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const std::vector<double>& resultValues,
|
||||
const std::vector<double>& resultMds,
|
||||
double minResultValue,
|
||||
double maxResultValue,
|
||||
double planeAngle,
|
||||
const Rim3dWellLogCurve* rim3dWellLogCurve,
|
||||
double planeOffsetFromWellPathCenter,
|
||||
double planeWidth)
|
||||
{
|
||||
std::vector<double> resultValues;
|
||||
std::vector<double> resultMds;
|
||||
rim3dWellLogCurve->curveValuesAndMds(&resultValues, &resultMds);
|
||||
|
||||
m_planeWidth = planeWidth;
|
||||
|
||||
// Make sure all drawables are cleared in case we return early to avoid a
|
||||
@@ -68,7 +68,7 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables(const caf::Display
|
||||
if (resultValues.empty()) return;
|
||||
CVF_ASSERT(resultValues.size() == resultMds.size());
|
||||
|
||||
if (maxResultValue - minResultValue < 1.0e-6)
|
||||
if (rim3dWellLogCurve->maxCurveValue() - rim3dWellLogCurve->minCurveValue() < 1.0e-6)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables(const caf::Display
|
||||
wellPathPoint = displayCoordTransform->transformToDisplayCoord(wellPathPoint);
|
||||
}
|
||||
|
||||
std::vector<cvf::Vec3d> wellPathCurveNormals = RigWellPathGeometryTools::calculateLineSegmentNormals(wellPathPoints, planeAngle);
|
||||
std::vector<cvf::Vec3d> wellPathCurveNormals = RigWellPathGeometryTools::calculateLineSegmentNormals(wellPathPoints, rim3dWellLogCurve->drawPlaneAngle());
|
||||
|
||||
std::vector<cvf::Vec3d> interpolatedWellPathPoints;
|
||||
std::vector<cvf::Vec3d> interpolatedCurveNormals;
|
||||
@@ -123,7 +123,7 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveDrawables(const caf::Display
|
||||
{
|
||||
if (!RigCurveDataTools::isValidValue(result, false)) continue;
|
||||
|
||||
result = cvf::Math::clamp(result, minResultValue, maxResultValue);
|
||||
result = cvf::Math::clamp(result, rim3dWellLogCurve->minCurveValue(), rim3dWellLogCurve->maxCurveValue());
|
||||
|
||||
maxClampedResult = std::max(result, maxClampedResult);
|
||||
minClampedResult = std::min(result, minClampedResult);
|
||||
|
||||
@@ -39,6 +39,7 @@ class BoundingBox;
|
||||
|
||||
class RigWellPath;
|
||||
class RimWellPath;
|
||||
class Rim3dWellLogCurve;
|
||||
|
||||
class Riv3dWellLogCurveGeometryGenerator : public cvf::Object
|
||||
{
|
||||
@@ -48,13 +49,9 @@ public:
|
||||
|
||||
void createCurveDrawables(const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const std::vector<double>& resultValues,
|
||||
const std::vector<double>& resultMds,
|
||||
double planeAngle,
|
||||
const Rim3dWellLogCurve* rim3dWellLogCurve,
|
||||
double planeOffsetFromWellPathCenter,
|
||||
double planeWidth,
|
||||
double minResultValue,
|
||||
double maxResultValue);
|
||||
double planeWidth);
|
||||
|
||||
void clearCurvePointsAndGeometry();
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
{
|
||||
CVF_ASSERT(gridIntervalSize > 0);
|
||||
|
||||
clearGeometry();
|
||||
|
||||
if (!wellPathGeometry() || wellPathGeometry()->m_measuredDepths.empty())
|
||||
{
|
||||
return false;
|
||||
@@ -81,7 +83,7 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
wellPathPoint = displayCoordTransform->transformToDisplayCoord(wellPathPoint);
|
||||
}
|
||||
|
||||
std::vector<cvf::Vec3d> wellPathSegmentNormals =
|
||||
std::vector<cvf::Vec3d> segmentNormals =
|
||||
RigWellPathGeometryTools::calculateLineSegmentNormals(wellPathPoints, planeAngle);
|
||||
|
||||
|
||||
@@ -106,11 +108,10 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
|
||||
// Note that normals are calculated on the full non-clipped well path to increase the likelihood of creating good normals
|
||||
// for the end points of the curve. So we need to clip the remainder here.
|
||||
wellPathSegmentNormals.erase(wellPathSegmentNormals.begin(), wellPathSegmentNormals.end() - wellPathPoints.size());
|
||||
segmentNormals.erase(segmentNormals.begin(), segmentNormals.end() - wellPathPoints.size());
|
||||
|
||||
{
|
||||
std::vector<cvf::Vec3f> vertices;
|
||||
vertices.reserve(wellPathPoints.size() * 2);
|
||||
m_vertices.reserve(wellPathPoints.size() * 2);
|
||||
|
||||
std::vector<cvf::uint> backgroundIndices;
|
||||
backgroundIndices.reserve(wellPathPoints.size() * 2);
|
||||
@@ -118,15 +119,15 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
// Vertices are used for both surface and border
|
||||
for (size_t i = 0; i < wellPathPoints.size(); i++)
|
||||
{
|
||||
vertices.push_back(cvf::Vec3f(
|
||||
wellPathPoints[i] + wellPathSegmentNormals[i] * planeOffsetFromWellPathCenter));
|
||||
vertices.push_back(cvf::Vec3f(
|
||||
wellPathPoints[i] + wellPathSegmentNormals[i] * (planeOffsetFromWellPathCenter + planeWidth)));
|
||||
m_vertices.push_back(cvf::Vec3f(
|
||||
wellPathPoints[i] + segmentNormals[i] * planeOffsetFromWellPathCenter));
|
||||
m_vertices.push_back(cvf::Vec3f(
|
||||
wellPathPoints[i] + segmentNormals[i] * (planeOffsetFromWellPathCenter + planeWidth)));
|
||||
backgroundIndices.push_back((cvf::uint) (2 * i));
|
||||
backgroundIndices.push_back((cvf::uint) (2 * i + 1));
|
||||
}
|
||||
|
||||
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray(vertices);
|
||||
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray(m_vertices);
|
||||
|
||||
{
|
||||
// Background specific
|
||||
@@ -141,9 +142,9 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
|
||||
{
|
||||
std::vector<cvf::uint> borderIndices;
|
||||
borderIndices.reserve(vertices.size());
|
||||
borderIndices.reserve(m_vertices.size());
|
||||
|
||||
int secondLastEvenVertex = (int) vertices.size() - 4;
|
||||
int secondLastEvenVertex = (int) m_vertices.size() - 4;
|
||||
|
||||
// Border close to the well. All even indices.
|
||||
for (int i = 0; i <= secondLastEvenVertex; i += 2)
|
||||
@@ -153,11 +154,11 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
}
|
||||
|
||||
// Connect to border away from well
|
||||
borderIndices.push_back((cvf::uint) (vertices.size() - 2));
|
||||
borderIndices.push_back((cvf::uint) (vertices.size() - 1));
|
||||
borderIndices.push_back((cvf::uint) (m_vertices.size() - 2));
|
||||
borderIndices.push_back((cvf::uint) (m_vertices.size() - 1));
|
||||
|
||||
int secondOddVertex = 3;
|
||||
int lastOddVertex = (int) vertices.size() - 1;
|
||||
int lastOddVertex = (int) m_vertices.size() - 1;
|
||||
|
||||
// Border away from from well are odd indices in reverse order to create a closed surface.
|
||||
for (int i = lastOddVertex; i >= secondOddVertex; i -= 2)
|
||||
@@ -190,15 +191,15 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
while (md >= firstMd)
|
||||
{
|
||||
cvf::Vec3d point = wellPathGeometry()->interpolatedVectorAlongWellPath(wellPathPoints, md);
|
||||
cvf::Vec3d curveNormal = wellPathGeometry()->interpolatedVectorAlongWellPath(wellPathSegmentNormals, md);
|
||||
cvf::Vec3d curveNormal = wellPathGeometry()->interpolatedVectorAlongWellPath(segmentNormals, md);
|
||||
interpolatedGridPoints.push_back(point);
|
||||
interpolatedGridCurveNormals.push_back(curveNormal.getNormalized());
|
||||
md -= gridIntervalSize;
|
||||
}
|
||||
|
||||
std::vector<cvf::Vec3f> vertices;
|
||||
std::vector<cvf::Vec3f> arrowVertices;
|
||||
std::vector<cvf::Vec3f> arrowVectors;
|
||||
vertices.reserve(interpolatedGridPoints.size());
|
||||
arrowVertices.reserve(interpolatedGridPoints.size());
|
||||
arrowVectors.reserve(interpolatedGridPoints.size());
|
||||
|
||||
double shaftRelativeRadius = 0.0125f;
|
||||
@@ -208,14 +209,14 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
// Normal lines. Start from one to avoid drawing at surface edge.
|
||||
for (size_t i = 1; i < interpolatedGridCurveNormals.size(); i++)
|
||||
{
|
||||
vertices.push_back(cvf::Vec3f(interpolatedGridPoints[i] + interpolatedGridCurveNormals[i] * planeOffsetFromWellPathCenter));
|
||||
arrowVertices.push_back(cvf::Vec3f(interpolatedGridPoints[i] + interpolatedGridCurveNormals[i] * planeOffsetFromWellPathCenter));
|
||||
|
||||
arrowVectors.push_back(cvf::Vec3f(interpolatedGridCurveNormals[i] * planeWidth * totalArrowScaling));
|
||||
}
|
||||
|
||||
m_curveNormalVectors = new cvf::DrawableVectors();
|
||||
|
||||
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray(vertices);
|
||||
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray(arrowVertices);
|
||||
cvf::ref<cvf::Vec3fArray> vectorArray = new cvf::Vec3fArray(arrowVectors);
|
||||
|
||||
// Create the arrow glyph for the vector drawer
|
||||
@@ -233,21 +234,49 @@ Riv3dWellLogGridGeometryGenerator::createGrid(const caf::DisplayCoordTransform*
|
||||
return true;
|
||||
}
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> Riv3dWellLogGridGeometryGenerator::background()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Riv3dWellLogGridGeometryGenerator::clearGeometry()
|
||||
{
|
||||
m_background = nullptr;
|
||||
m_border = nullptr;
|
||||
m_curveNormalVectors = nullptr;
|
||||
m_vertices.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> Riv3dWellLogGridGeometryGenerator::background() const
|
||||
{
|
||||
return m_background;
|
||||
}
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> Riv3dWellLogGridGeometryGenerator::border()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> Riv3dWellLogGridGeometryGenerator::border() const
|
||||
{
|
||||
return m_border;
|
||||
}
|
||||
|
||||
cvf::ref<cvf::DrawableVectors> Riv3dWellLogGridGeometryGenerator::curveNormalVectors()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableVectors> Riv3dWellLogGridGeometryGenerator::curveNormalVectors() const
|
||||
{
|
||||
return m_curveNormalVectors;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<cvf::Vec3f>& Riv3dWellLogGridGeometryGenerator::vertices() const
|
||||
{
|
||||
return m_vertices;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -51,10 +51,15 @@ public:
|
||||
double planeOffsetFromWellPathCenter,
|
||||
double planeWidth,
|
||||
double gridIntervalSize);
|
||||
|
||||
void clearGeometry();
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> background() const;
|
||||
cvf::ref<cvf::DrawableGeo> border() const;
|
||||
cvf::ref<cvf::DrawableVectors> curveNormalVectors() const;
|
||||
|
||||
const std::vector<cvf::Vec3f>& vertices() const;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> background();
|
||||
cvf::ref<cvf::DrawableGeo> border();
|
||||
cvf::ref<cvf::DrawableVectors> curveNormalVectors();
|
||||
private:
|
||||
const RigWellPath* wellPathGeometry() const;
|
||||
|
||||
@@ -63,4 +68,6 @@ private:
|
||||
cvf::ref<cvf::DrawableGeo> m_background;
|
||||
cvf::ref<cvf::DrawableGeo> m_border;
|
||||
cvf::ref<cvf::DrawableVectors> m_curveNormalVectors;
|
||||
|
||||
std::vector<cvf::Vec3f> m_vertices;
|
||||
};
|
||||
|
||||
@@ -70,71 +70,55 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel(cvf::ModelBasicList*
|
||||
|
||||
if (m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty()) return;
|
||||
|
||||
append3dWellLogCurvesToModel(model, displayCoordTransform, wellPathClipBoundingBox);
|
||||
|
||||
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
||||
{
|
||||
appendGridToModel(model, displayCoordTransform, wellPathClipBoundingBox, rim3dWellLogCurve, planeWidth());
|
||||
append3dWellLogCurveToModel(model, displayCoordTransform, wellPathClipBoundingBox, rim3dWellLogCurve);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Riv3dWellLogPlanePartMgr::append3dWellLogCurvesToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox)
|
||||
void Riv3dWellLogPlanePartMgr::append3dWellLogCurveToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
Rim3dWellLogCurve* rim3dWellLogCurve)
|
||||
{
|
||||
if (m_wellPath.isNull()) return;
|
||||
if (!m_wellPath->rim3dWellLogCurveCollection()) return;
|
||||
if (m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty()) return;
|
||||
CVF_ASSERT(rim3dWellLogCurve);
|
||||
if (!rim3dWellLogCurve->isShowingCurve()) return;
|
||||
|
||||
Rim3dWellLogCurveCollection* curveCollection = m_wellPath->rim3dWellLogCurveCollection();
|
||||
|
||||
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
||||
cvf::ref<Riv3dWellLogCurveGeometryGenerator> generator = rim3dWellLogCurve->geometryGenerator();
|
||||
if (generator.isNull())
|
||||
{
|
||||
cvf::ref<Riv3dWellLogCurveGeometryGenerator> generator = rim3dWellLogCurve->geometryGenerator();
|
||||
if (generator.isNull())
|
||||
{
|
||||
generator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p());
|
||||
rim3dWellLogCurve->setGeometryGenerator(generator.p());
|
||||
}
|
||||
|
||||
if (!rim3dWellLogCurve->isShowingCurve()) continue;
|
||||
generator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p());
|
||||
rim3dWellLogCurve->setGeometryGenerator(generator.p());
|
||||
}
|
||||
|
||||
std::vector<double> resultValues;
|
||||
std::vector<double> resultMds;
|
||||
rim3dWellLogCurve->curveValuesAndMds(&resultValues, &resultMds);
|
||||
generator->createCurveDrawables(displayCoordTransform,
|
||||
wellPathClipBoundingBox,
|
||||
rim3dWellLogCurve,
|
||||
wellPathCenterToPlotStartOffset(rim3dWellLogCurve),
|
||||
planeWidth());
|
||||
|
||||
generator->createCurveDrawables(displayCoordTransform,
|
||||
wellPathClipBoundingBox,
|
||||
resultValues,
|
||||
resultMds,
|
||||
rim3dWellLogCurve->minCurveValue(),
|
||||
rim3dWellLogCurve->maxCurveValue(),
|
||||
planeAngle(curveCollection, rim3dWellLogCurve),
|
||||
wellPathCenterToPlotStartOffset(curveCollection, rim3dWellLogCurve),
|
||||
planeWidth());
|
||||
cvf::ref<cvf::DrawableGeo> curveDrawable = generator->curveDrawable();
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> curveDrawable = generator->curveDrawable();
|
||||
if (curveDrawable.isNull() || !curveDrawable->boundingBox().isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (curveDrawable.isNull() || !curveDrawable->boundingBox().isValid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
caf::MeshEffectGenerator meshEffectGen(rim3dWellLogCurve->color());
|
||||
meshEffectGen.setLineWidth(2.0f);
|
||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
||||
|
||||
caf::MeshEffectGenerator meshEffectGen(rim3dWellLogCurve->color());
|
||||
meshEffectGen.setLineWidth(2.0f);
|
||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setDrawable(curveDrawable.p());
|
||||
part->setEffect(effect.p());
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
part->setDrawable(curveDrawable.p());
|
||||
part->setEffect(effect.p());
|
||||
|
||||
if (part.notNull())
|
||||
{
|
||||
model->addPart(part.p());
|
||||
}
|
||||
if (part.notNull())
|
||||
{
|
||||
model->addPart(part.p());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,48 +141,10 @@ cvf::ref<cvf::Part> Riv3dWellLogPlanePartMgr::createPart(cvf::Drawable* drawable
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double Riv3dWellLogPlanePartMgr::planeAngle(const Rim3dWellLogCurveCollection* collection,
|
||||
const Rim3dWellLogCurve* curve)
|
||||
double Riv3dWellLogPlanePartMgr::wellPathCenterToPlotStartOffset(const Rim3dWellLogCurve* curve) const
|
||||
{
|
||||
switch (curve->drawPlane())
|
||||
{
|
||||
case Rim3dWellLogCurve::HORIZONTAL_LEFT:
|
||||
return cvf::PI_D / 2.0;
|
||||
case Rim3dWellLogCurve::HORIZONTAL_RIGHT:
|
||||
if (collection->planePositionHorizontal() == Rim3dWellLogCurveCollection::ON_WELLPATH)
|
||||
{
|
||||
return cvf::PI_D / 2.0; // Always left when on well path
|
||||
}
|
||||
return -cvf::PI_D / 2.0;
|
||||
case Rim3dWellLogCurve::VERTICAL_ABOVE:
|
||||
return 0.0;
|
||||
case Rim3dWellLogCurve::VERTICAL_BELOW:
|
||||
if (collection->planePositionVertical() == Rim3dWellLogCurveCollection::ON_WELLPATH)
|
||||
{
|
||||
return 0.0; // Always above when on well path.
|
||||
}
|
||||
return cvf::PI_D;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double Riv3dWellLogPlanePartMgr::wellPathCenterToPlotStartOffset(const Rim3dWellLogCurveCollection* collection, const Rim3dWellLogCurve* curve) const
|
||||
{
|
||||
bool centered = false;
|
||||
if (curve->drawPlane() == Rim3dWellLogCurve::HORIZONTAL_LEFT ||
|
||||
curve->drawPlane() == Rim3dWellLogCurve::HORIZONTAL_RIGHT)
|
||||
{
|
||||
centered = collection->planePositionHorizontal() == Rim3dWellLogCurveCollection::ON_WELLPATH;
|
||||
}
|
||||
else
|
||||
{
|
||||
centered = collection->planePositionVertical() == Rim3dWellLogCurveCollection::ON_WELLPATH;
|
||||
}
|
||||
if (centered)
|
||||
if (curve->drawPlane() == Rim3dWellLogCurve::HORIZONTAL_CENTER ||
|
||||
curve->drawPlane() == Rim3dWellLogCurve::VERTICAL_CENTER)
|
||||
{
|
||||
return -0.5*planeWidth();
|
||||
}
|
||||
@@ -251,8 +197,8 @@ void Riv3dWellLogPlanePartMgr::appendGridToModel(cvf::ModelBasicList*
|
||||
|
||||
bool gridCreated = m_3dWellLogGridGeometryGenerator->createGrid(displayCoordTransform,
|
||||
wellPathClipBoundingBox,
|
||||
planeAngle(curveCollection, rim3dWellLogCurve),
|
||||
wellPathCenterToPlotStartOffset(curveCollection, rim3dWellLogCurve),
|
||||
rim3dWellLogCurve->drawPlaneAngle(),
|
||||
wellPathCenterToPlotStartOffset(rim3dWellLogCurve),
|
||||
planeWidth(),
|
||||
gridIntervalSize);
|
||||
if (!gridCreated) return;
|
||||
|
||||
@@ -56,9 +56,10 @@ public:
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||
private:
|
||||
void append3dWellLogCurvesToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||
void append3dWellLogCurveToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
Rim3dWellLogCurve* rim3dWellLogCurve);
|
||||
|
||||
void appendGridToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
@@ -68,8 +69,7 @@ private:
|
||||
|
||||
cvf::ref<cvf::Part> createPart(cvf::Drawable* drawable, cvf::Effect* effect);
|
||||
|
||||
static double planeAngle(const Rim3dWellLogCurveCollection* collection, const Rim3dWellLogCurve* curve);
|
||||
double wellPathCenterToPlotStartOffset(const Rim3dWellLogCurveCollection* collection, const Rim3dWellLogCurve* curve) const;
|
||||
double wellPathCenterToPlotStartOffset(const Rim3dWellLogCurve* curve) const;
|
||||
double planeWidth() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user