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