2015-11-17 02:23:33 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2018-09-21 04:43:03 -05:00
|
|
|
//
|
2015-11-17 02:23:33 -06:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2018-09-21 04:43:03 -05:00
|
|
|
//
|
2015-11-17 02:23:33 -06:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2018-09-21 04:43:03 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-11-17 02:23:33 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-09-21 07:09:32 -05:00
|
|
|
#include "cvfArray.h"
|
2015-11-17 02:23:33 -06:00
|
|
|
#include "cvfColor4.h"
|
2018-02-16 07:37:59 -06:00
|
|
|
#include "cvfMatrix4.h"
|
2018-09-21 04:43:03 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfVector3.h"
|
2018-02-16 07:37:59 -06:00
|
|
|
|
2018-01-25 10:37:22 -06:00
|
|
|
#include "cafPdmPointer.h"
|
2021-08-26 01:13:03 -05:00
|
|
|
#include "cvfCollection.h"
|
2015-11-19 04:41:16 -06:00
|
|
|
|
2018-04-10 08:35:10 -05:00
|
|
|
#include <QString>
|
|
|
|
|
2018-02-07 04:40:48 -06:00
|
|
|
#include <list>
|
2018-04-10 08:35:10 -05:00
|
|
|
#include <vector>
|
2015-11-17 02:23:33 -06:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2018-09-21 04:43:03 -05:00
|
|
|
class ModelBasicList;
|
|
|
|
class Transform;
|
|
|
|
class Part;
|
|
|
|
class ScalarMapper;
|
|
|
|
class DrawableGeo;
|
|
|
|
} // namespace cvf
|
2015-11-17 02:23:33 -06:00
|
|
|
|
2017-01-17 08:11:02 -06:00
|
|
|
class RigFemPart;
|
|
|
|
class RigFemResultAddress;
|
|
|
|
class RigGeoMechCaseData;
|
2015-11-19 04:41:16 -06:00
|
|
|
class RigMainGrid;
|
2017-01-17 08:11:02 -06:00
|
|
|
class RigResultAccessor;
|
2018-03-12 03:21:27 -05:00
|
|
|
class Rim3dView;
|
2015-11-17 02:23:33 -06:00
|
|
|
class RimCellEdgeColors;
|
2017-01-17 08:11:02 -06:00
|
|
|
class RimEclipseCellColors;
|
2019-11-26 04:35:21 -06:00
|
|
|
class RimExtrudedCurveIntersection;
|
2018-02-01 10:45:22 -06:00
|
|
|
class RivTernaryScalarMapper;
|
2019-11-26 04:51:54 -06:00
|
|
|
class RivExtrudedCurveIntersectionGeometryGenerator;
|
2017-01-17 08:11:02 -06:00
|
|
|
class RivIntersectionHexGridInterface;
|
|
|
|
class RivIntersectionVertexWeights;
|
2018-02-07 04:40:48 -06:00
|
|
|
class RivPipeGeometryGenerator;
|
2021-05-31 01:09:13 -05:00
|
|
|
class RivIntersectionGeometryGeneratorIF;
|
2015-11-17 02:23:33 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
|
2019-11-26 04:51:54 -06:00
|
|
|
class RivExtrudedCurveIntersectionPartMgr : public cvf::Object
|
2015-11-17 02:23:33 -06:00
|
|
|
{
|
|
|
|
public:
|
2020-02-12 04:43:15 -06:00
|
|
|
explicit RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimIntersection, bool isFlattened = false );
|
2015-11-17 02:23:33 -06:00
|
|
|
|
|
|
|
void applySingleColorEffect();
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateCellResultColor( size_t timeStepIndex,
|
2019-11-25 08:33:42 -06:00
|
|
|
const cvf::ScalarMapper* explicitScalarColorMapper,
|
|
|
|
const RivTernaryScalarMapper* explicitTernaryColorMapper );
|
2015-11-17 02:23:33 -06:00
|
|
|
|
2020-01-14 05:36:38 -06:00
|
|
|
void appendIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
2019-09-06 03:40:57 -05:00
|
|
|
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
|
|
|
void appendPolylinePartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
2016-10-18 07:25:31 -05:00
|
|
|
|
2020-04-07 07:28:55 -05:00
|
|
|
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat ) const;
|
2015-11-19 04:41:16 -06:00
|
|
|
|
2021-05-31 01:09:13 -05:00
|
|
|
const RivIntersectionGeometryGeneratorIF* intersectionGeometryGenerator() const;
|
|
|
|
|
2015-11-19 04:41:16 -06:00
|
|
|
private:
|
2018-02-07 04:40:48 -06:00
|
|
|
void generatePartGeometry();
|
2019-09-06 03:40:57 -05:00
|
|
|
void createFaultLabelParts( const std::vector<std::pair<QString, cvf::Vec3d>>& labelAndAnchors );
|
|
|
|
void createPolyLineParts( bool useBufferObjects );
|
|
|
|
void createExtrusionDirParts( bool useBufferObjects );
|
2021-08-26 01:13:03 -05:00
|
|
|
void createAnnotationSurfaceParts( bool useBufferObjects );
|
2018-02-07 04:40:48 -06:00
|
|
|
|
|
|
|
private:
|
2019-11-26 05:30:44 -06:00
|
|
|
caf::PdmPointer<RimExtrudedCurveIntersection> m_rimIntersection;
|
2015-11-17 02:23:33 -06:00
|
|
|
|
2019-11-26 05:30:44 -06:00
|
|
|
cvf::ref<RivExtrudedCurveIntersectionGeometryGenerator> m_intersectionGenerator;
|
2018-04-10 08:35:10 -05:00
|
|
|
|
2019-11-26 05:30:44 -06:00
|
|
|
cvf::ref<cvf::Part> m_intersectionFaces;
|
|
|
|
cvf::ref<cvf::Part> m_intersectionGridLines;
|
|
|
|
cvf::ref<cvf::Part> m_intersectionFaultGridLines;
|
2018-09-21 04:43:03 -05:00
|
|
|
cvf::ref<cvf::Part> m_faultMeshLabels;
|
|
|
|
cvf::ref<cvf::Part> m_faultMeshLabelLines;
|
|
|
|
cvf::ref<cvf::Part> m_highlightLineAlongPolyline;
|
|
|
|
cvf::ref<cvf::Part> m_highlightPointsForPolyline;
|
|
|
|
cvf::ref<cvf::Part> m_highlightLineAlongExtrusionDir;
|
|
|
|
cvf::ref<cvf::Part> m_highlightPointsForExtrusionDir;
|
2015-11-17 02:23:33 -06:00
|
|
|
|
2021-08-26 01:13:03 -05:00
|
|
|
cvf::Collection<cvf::Part> m_annotationParts;
|
|
|
|
|
2019-11-26 05:30:44 -06:00
|
|
|
cvf::ref<cvf::Vec2fArray> m_intersectionFacesTextureCoords;
|
2018-01-25 10:37:22 -06:00
|
|
|
|
2018-02-07 04:40:48 -06:00
|
|
|
struct RivPipeBranchData
|
|
|
|
{
|
2018-09-21 04:43:03 -05:00
|
|
|
cvf::ref<RivPipeGeometryGenerator> m_pipeGeomGenerator;
|
|
|
|
cvf::ref<cvf::Part> m_surfacePart;
|
|
|
|
cvf::ref<cvf::Part> m_centerLinePart;
|
2018-02-07 04:40:48 -06:00
|
|
|
};
|
|
|
|
std::list<RivPipeBranchData> m_wellBranches;
|
|
|
|
|
2018-09-21 04:43:03 -05:00
|
|
|
bool m_isFlattened;
|
2015-11-17 02:23:33 -06:00
|
|
|
};
|