2013-12-14 02:26:34 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-24 00:14:52 -05:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2013-12-14 02:26:34 -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-06-26 03:25:08 -05:00
|
|
|
|
2017-08-14 03:47:44 -05:00
|
|
|
#include "RiaDefines.h"
|
2017-06-26 03:25:08 -05:00
|
|
|
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2013-12-14 02:26:34 -06:00
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfArray.h"
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class ScalarMapper;
|
|
|
|
class DrawableGeo;
|
|
|
|
}
|
|
|
|
|
|
|
|
class RigNNCData;
|
|
|
|
class RigGridBase;
|
2019-01-23 09:08:25 -06:00
|
|
|
class RigEclipseResultAddress;
|
2013-12-14 02:26:34 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
|
|
|
|
class RivNNCGeometryGenerator : public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RivNNCGeometryGenerator(const RigNNCData* nncData, const cvf::Vec3d& offset, const cvf::Array<size_t>* nncIndexes );
|
2018-10-18 12:45:57 -05:00
|
|
|
~RivNNCGeometryGenerator() override;
|
2013-12-14 02:26:34 -06:00
|
|
|
|
|
|
|
void setCellVisibility( const cvf::UByteArray* cellVisibilities, const RigGridBase * grid);
|
|
|
|
|
|
|
|
void textureCoordinates(cvf::Vec2fArray* textureCoords,
|
2017-06-26 03:25:08 -05:00
|
|
|
const cvf::ScalarMapper* mapper,
|
2017-08-14 03:47:44 -05:00
|
|
|
RiaDefines::ResultCatType resultType,
|
2019-01-23 09:08:25 -06:00
|
|
|
const RigEclipseResultAddress& resVarAddr,
|
2017-10-19 02:57:10 -05:00
|
|
|
size_t nativeTimeStepIndex) const;
|
2013-12-14 02:26:34 -06:00
|
|
|
|
|
|
|
// Mapping between cells and geometry
|
|
|
|
cvf::ref<cvf::Array<size_t> > triangleToNNCIndex() const;
|
|
|
|
|
|
|
|
// Generated geometry
|
|
|
|
cvf::ref<cvf::DrawableGeo> generateSurface();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void computeArrays();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Input
|
|
|
|
cvf::cref<RigNNCData> m_nncData;
|
2013-12-16 06:48:51 -06:00
|
|
|
cvf::cref<cvf::Array<size_t> > m_nncIndexes;
|
2013-12-14 02:26:34 -06:00
|
|
|
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;
|
|
|
|
};
|