2013-12-03 20:30:32 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-24 07:14:52 +02:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-12-03 20:30:32 +01: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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-12-03 20:30:32 +01: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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2013-12-03 20:30:32 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2017-02-24 13:34:25 +01:00
|
|
|
|
|
|
|
|
#include "cvfArray.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cvfObject.h"
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2013-12-19 08:48:36 +01:00
|
|
|
#include "cafEffectGenerator.h"
|
2018-09-21 11:36:32 +02:00
|
|
|
#include "cafPdmPointer.h"
|
2013-12-03 20:30:32 +01:00
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
class StructGridInterface;
|
|
|
|
|
class ModelBasicList;
|
|
|
|
|
class Transform;
|
|
|
|
|
class Part;
|
|
|
|
|
} // namespace cvf
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2015-06-25 12:04:46 +02:00
|
|
|
class RimEclipseCellColors;
|
2015-06-25 13:41:55 +02:00
|
|
|
class RimCellEdgeColors;
|
2017-10-15 21:20:03 +02:00
|
|
|
class RimFaultInViewCollection;
|
2017-02-24 13:34:25 +01:00
|
|
|
class RigGridBase;
|
2017-10-15 21:20:03 +02:00
|
|
|
class RimFaultInViewCollection;
|
2017-10-13 15:01:52 +02:00
|
|
|
class RimFaultInView;
|
2017-02-24 13:34:25 +01:00
|
|
|
class RivFaultGeometryGenerator;
|
|
|
|
|
class RivNNCGeometryGenerator;
|
|
|
|
|
|
2013-12-03 20:30:32 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
2013-12-10 07:56:58 +01:00
|
|
|
///
|
2013-12-03 20:30:32 +01:00
|
|
|
//==================================================================================================
|
2013-12-10 07:56:58 +01:00
|
|
|
|
|
|
|
|
class RivFaultPartMgr : public cvf::Object
|
2013-12-03 20:30:32 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2020-02-12 11:43:15 +01:00
|
|
|
RivFaultPartMgr( const RigGridBase* grid, const RimFaultInViewCollection* rimFaultCollection, RimFaultInView* rimFault );
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setCellVisibility( cvf::UByteArray* cellVisibilities );
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2013-12-10 07:56:58 +01:00
|
|
|
void applySingleColorEffect();
|
2020-02-12 11:13:38 +01:00
|
|
|
void setOpacityLevel( float opacity ) { m_opacityLevel = opacity; }
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateCellResultColor( size_t timeStepIndex, RimEclipseCellColors* cellResultColors );
|
|
|
|
|
void updateCellEdgeResultColor( size_t timeStepIndex,
|
|
|
|
|
RimEclipseCellColors* cellResultColors,
|
|
|
|
|
RimCellEdgeColors* cellEdgeResultColors );
|
|
|
|
|
|
|
|
|
|
void appendNativeFaultFacesToModel( cvf::ModelBasicList* model );
|
|
|
|
|
void appendOppositeFaultFacesToModel( cvf::ModelBasicList* model );
|
|
|
|
|
void appendLabelPartsToModel( cvf::ModelBasicList* model );
|
|
|
|
|
void appendMeshLinePartsToModel( cvf::ModelBasicList* model );
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2020-01-17 14:44:36 +01:00
|
|
|
void appendNativeNNCFacesToModel( cvf::ModelBasicList* model );
|
|
|
|
|
void appendCompleteNNCFacesToModel( cvf::ModelBasicList* model );
|
|
|
|
|
|
2013-12-10 07:56:58 +01:00
|
|
|
private:
|
|
|
|
|
void generatePartGeometry();
|
|
|
|
|
void updatePartEffect();
|
2013-12-18 09:21:35 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateNNCColors( size_t timeStepIndex, RimEclipseCellColors* cellResultColors );
|
2013-12-19 09:08:08 +01:00
|
|
|
|
2013-12-19 08:48:36 +01:00
|
|
|
caf::FaceCulling faceCullingMode() const;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
|
|
|
|
void createLabelWithAnchorLine( const cvf::Part* part );
|
|
|
|
|
|
|
|
|
|
static cvf::Vec3f findClosestVertex( const cvf::Vec3f& point, const cvf::Vec3fArray* vertices );
|
|
|
|
|
|
2013-12-03 20:30:32 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::cref<RigGridBase> m_grid;
|
2018-09-21 11:36:32 +02:00
|
|
|
caf::PdmPointer<RimFaultInView> m_rimFault;
|
2019-09-06 10:40:57 +02:00
|
|
|
const RimFaultInViewCollection* m_rimFaultCollection;
|
|
|
|
|
|
|
|
|
|
float m_opacityLevel;
|
|
|
|
|
cvf::Color3f m_defaultColor;
|
2013-12-10 07:56:58 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<cvf::UByteArray> m_cellVisibility;
|
2013-12-10 07:56:58 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RivFaultGeometryGenerator> m_nativeFaultGenerator;
|
|
|
|
|
cvf::ref<cvf::Part> m_nativeFaultFaces;
|
|
|
|
|
cvf::ref<cvf::Part> m_nativeFaultGridLines;
|
|
|
|
|
cvf::ref<cvf::Vec2fArray> m_nativeFaultFacesTextureCoords;
|
2013-12-10 07:56:58 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RivFaultGeometryGenerator> m_oppositeFaultGenerator;
|
|
|
|
|
cvf::ref<cvf::Part> m_oppositeFaultFaces;
|
|
|
|
|
cvf::ref<cvf::Part> m_oppositeFaultGridLines;
|
|
|
|
|
cvf::ref<cvf::Vec2fArray> m_oppositeFaultFacesTextureCoords;
|
2013-12-10 07:56:58 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RivNNCGeometryGenerator> m_NNCGenerator;
|
|
|
|
|
cvf::ref<cvf::Part> m_NNCFaces;
|
|
|
|
|
cvf::ref<cvf::Vec2fArray> m_NNCTextureCoords;
|
2013-12-10 07:56:58 +01:00
|
|
|
|
2020-01-17 14:44:36 +01:00
|
|
|
cvf::ref<RivNNCGeometryGenerator> m_allenNNCGenerator;
|
|
|
|
|
cvf::ref<cvf::Part> m_allenNNCFaces;
|
|
|
|
|
cvf::ref<cvf::Vec2fArray> m_allenNNCTextureCoords;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<cvf::Part> m_faultLabelPart;
|
|
|
|
|
cvf::ref<cvf::Part> m_faultLabelLinePart;
|
2013-12-03 20:30:32 +01:00
|
|
|
};
|