///////////////////////////////////////////////////////////////////////////////// // // 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 // 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& 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> triangleToNNCIndex() const; // Generated geometry cvf::ref generateSurface(); private: void computeArrays(); private: bool m_includeAllanDiagramGeometry; // Input cvf::ref m_nncData; std::vector m_nncIndexes; cvf::cref m_cellVisibility; cvf::cref m_grid; cvf::Vec3d m_offset; // Triangles cvf::ref m_vertices; // Mappings cvf::ref> m_triangleIndexToNNCIndex; };