///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) Statoil ASA, 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 "cvfBase.h" #include "cvfObject.h" #include "cvfArray.h" namespace cvf { class ScalarMapper; class DrawableGeo; } class RigNNCData; class RigGridBase; //================================================================================================== /// /// //================================================================================================== class RivNNCGeometryGenerator : public cvf::Object { public: RivNNCGeometryGenerator(const RigNNCData* nncData, const cvf::Vec3d& offset, const cvf::Array* nncIndexes ); ~RivNNCGeometryGenerator(); void setCellVisibility( const cvf::UByteArray* cellVisibilities, const RigGridBase * grid); void textureCoordinates(cvf::Vec2fArray* textureCoords, const cvf::ScalarMapper* mapper) const; // Mapping between cells and geometry cvf::ref > triangleToNNCIndex() const; // Generated geometry cvf::ref generateSurface(); private: void computeArrays(); private: // Input cvf::cref m_nncData; cvf::cref > m_nncIndexes; cvf::cref m_cellVisibility; cvf::cref m_grid; cvf::Vec3d m_offset; // Triangles cvf::ref m_vertices; // Mappings cvf::ref > m_triangleIndexToNNCIndex; };