2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02: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
|
|
|
//
|
2012-05-18 09:45:23 +02: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>
|
2012-05-18 09:45:23 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2018-09-12 14:24:24 +02:00
|
|
|
|
|
|
|
|
#include "RigGridBase.h"
|
|
|
|
|
|
2018-09-19 11:01:11 +02:00
|
|
|
#include "RivCellSetEnum.h"
|
|
|
|
|
|
2018-09-19 09:51:55 +02:00
|
|
|
#include "cafPdmPointer.h"
|
|
|
|
|
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cvfObject.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
#include "cvfStructGridGeometryGenerator.h"
|
|
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
class StructGridInterface;
|
|
|
|
|
class ModelBasicList;
|
|
|
|
|
class Transform;
|
|
|
|
|
class Part;
|
|
|
|
|
class Effect;
|
|
|
|
|
} // namespace cvf
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-06-25 12:04:46 +02:00
|
|
|
class RimEclipseCellColors;
|
2015-06-25 13:41:55 +02:00
|
|
|
class RimCellEdgeColors;
|
2018-09-19 09:51:55 +02:00
|
|
|
class RimEclipseCase;
|
2018-09-19 11:01:11 +02:00
|
|
|
class RivSourceInfo;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-12-17 07:58:29 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
/// RivGridGeometry: Class to handle visualization structures that embodies a specific grid at a specific time step.
|
|
|
|
|
/// frame on a certain level
|
|
|
|
|
/// LGR's have their own instance and the parent grid as well
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
class RivGridPartMgr : public cvf::Object
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
RivGridPartMgr( RivCellSetEnum cellSetType, RimEclipseCase* eclipseCase, const RigGridBase* grid, size_t gridIdx );
|
2018-10-18 19:45:57 +02:00
|
|
|
~RivGridPartMgr() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setTransform( cvf::Transform* scaleTransform );
|
|
|
|
|
void setCellVisibility( cvf::UByteArray* cellVisibilities );
|
2020-02-12 11:13:38 +01:00
|
|
|
cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility; }
|
2014-04-11 13:08:05 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateCellColor( cvf::Color4f color );
|
|
|
|
|
void updateCellResultColor( size_t timeStepIndex, RimEclipseCellColors* cellResultColors );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateCellEdgeResultColor( size_t timeStepIndex,
|
|
|
|
|
RimEclipseCellColors* cellResultColors,
|
|
|
|
|
RimCellEdgeColors* cellEdgeResultColors );
|
|
|
|
|
|
|
|
|
|
void appendPartsToModel( cvf::ModelBasicList* model );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void generatePartGeometry( cvf::StructGridGeometryGenerator& geoBuilder );
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t m_gridIdx;
|
|
|
|
|
cvf::cref<RigGridBase> m_grid;
|
2013-02-01 12:25:34 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<cvf::Transform> m_scaleTransform;
|
|
|
|
|
float m_opacityLevel;
|
|
|
|
|
cvf::Color3f m_defaultColor;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
// Surface visualization
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::StructGridGeometryGenerator m_surfaceGenerator;
|
|
|
|
|
RigGridCellFaceVisibilityFilter m_surfaceFaceFilter;
|
|
|
|
|
cvf::ref<cvf::Part> m_surfaceFaces;
|
|
|
|
|
cvf::ref<cvf::Vec2fArray> m_surfaceFacesTextureCoords;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<cvf::Part> m_surfaceGridLines;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<cvf::UByteArray> m_cellVisibility;
|
2018-09-19 09:51:55 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
|
|
|
|
RivCellSetEnum m_cellSetType;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|