mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
f8c5cf389f
* Set column width to 140 * Use c++20 * Remove redundant virtual
81 lines
2.5 KiB
C++
81 lines
2.5 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) Statoil ASA
|
|
// Copyright (C) Ceetron Solutions AS
|
|
//
|
|
// 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
|
|
|
|
#include "RiaDefines.h"
|
|
|
|
#include "cvfArray.h"
|
|
#include "cvfObject.h"
|
|
|
|
namespace cvf
|
|
{
|
|
class ScalarMapper;
|
|
class DrawableGeo;
|
|
} // namespace cvf
|
|
|
|
class RigNNCData;
|
|
class RigGridBase;
|
|
class RigEclipseResultAddress;
|
|
|
|
//==================================================================================================
|
|
///
|
|
///
|
|
//==================================================================================================
|
|
|
|
class RivNNCGeometryGenerator : public cvf::Object
|
|
{
|
|
public:
|
|
RivNNCGeometryGenerator( bool includeAllan, RigNNCData* nncData, const cvf::Vec3d& offset, const std::vector<size_t>& nncIndexes );
|
|
|
|
~RivNNCGeometryGenerator() override;
|
|
|
|
void setCellVisibility( const cvf::UByteArray* cellVisibilities, const RigGridBase* grid );
|
|
|
|
void textureCoordinates( cvf::Vec2fArray* textureCoords,
|
|
const cvf::ScalarMapper* mapper,
|
|
RiaDefines::ResultCatType resultType,
|
|
const RigEclipseResultAddress& resVarAddr,
|
|
size_t nativeTimeStepIndex ) const;
|
|
|
|
// Mapping between cells and geometry
|
|
cvf::ref<cvf::Array<size_t>> triangleToNNCIndex() const;
|
|
|
|
// Generated geometry
|
|
cvf::ref<cvf::DrawableGeo> generateSurface();
|
|
|
|
private:
|
|
void computeArrays();
|
|
|
|
private:
|
|
bool m_includeAllanDiagramGeometry;
|
|
|
|
// Input
|
|
cvf::ref<RigNNCData> m_nncData;
|
|
std::vector<size_t> m_nncIndexes;
|
|
cvf::cref<cvf::UByteArray> m_cellVisibility;
|
|
cvf::cref<RigGridBase> m_grid;
|
|
cvf::Vec3d m_offset;
|
|
// Triangles
|
|
cvf::ref<cvf::Vec3fArray> m_vertices;
|
|
|
|
// Mappings
|
|
cvf::ref<cvf::Array<size_t>> m_triangleIndexToNNCIndex;
|
|
};
|