2014-08-11 01:10:07 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-24 00:14:52 -05:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2014-08-11 01:10:07 -05: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 03:40:57 -05:00
|
|
|
//
|
2014-08-11 01:10:07 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2014-08-11 01:10:07 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-10-16 04:13:56 -05:00
|
|
|
#include "RigTernaryResultAccessor.h"
|
2014-08-11 03:50:31 -05:00
|
|
|
#include "RivTernaryResultToTextureMapper.h"
|
|
|
|
|
2014-08-11 01:10:07 -05:00
|
|
|
#include "cvfArray.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cvfObject.h"
|
2014-08-11 01:10:07 -05:00
|
|
|
|
2019-11-18 09:05:36 -06:00
|
|
|
class RimEclipseResultDefinition;
|
2014-08-11 01:10:07 -05:00
|
|
|
class RimTernaryLegendConfig;
|
2019-11-18 09:05:36 -06:00
|
|
|
class RimSimWellInViewCollection;
|
2014-08-11 01:10:07 -05:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class StructGridQuadToCellFaceMapper;
|
2014-08-11 01:10:07 -05:00
|
|
|
}
|
|
|
|
|
2014-08-11 03:50:31 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2014-08-11 03:50:31 -05:00
|
|
|
//==================================================================================================
|
2014-08-11 01:10:07 -05:00
|
|
|
class RivTernaryTextureCoordsCreator
|
|
|
|
{
|
|
|
|
public:
|
2019-11-20 03:28:35 -06:00
|
|
|
RivTernaryTextureCoordsCreator( const RimEclipseResultDefinition* cellResultColors,
|
2019-09-06 03:40:57 -05:00
|
|
|
RimTernaryLegendConfig* ternaryLegendConfig,
|
2019-11-18 09:05:36 -06:00
|
|
|
RimSimWellInViewCollection* simWellInViewCollection,
|
2019-09-06 03:40:57 -05:00
|
|
|
size_t timeStepIndex,
|
|
|
|
size_t gridIndex,
|
|
|
|
const cvf::StructGridQuadToCellFaceMapper* quadMapper );
|
2014-08-11 01:10:07 -05:00
|
|
|
|
2019-11-20 03:28:35 -06:00
|
|
|
RivTernaryTextureCoordsCreator( const RimEclipseResultDefinition* cellResultColors,
|
|
|
|
const RivTernaryScalarMapper* ternaryColorMapper,
|
|
|
|
size_t timeStepIndex );
|
2015-11-23 08:24:03 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void createTextureCoords( cvf::Vec2fArray* quadTextureCoords );
|
|
|
|
void createTextureCoords( cvf::Vec2fArray* triTextureCoords, const std::vector<size_t>& triangleToCellIdx );
|
2014-08-11 01:10:07 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
static void createTextureCoords( cvf::Vec2fArray* quadTextureCoords,
|
|
|
|
const cvf::StructGridQuadToCellFaceMapper* quadMapper,
|
|
|
|
const RigTernaryResultAccessor* resultAccessor,
|
|
|
|
const RivTernaryResultToTextureMapper* texMapper );
|
|
|
|
|
|
|
|
static void createTextureCoords( cvf::Vec2fArray* triTextureCoords,
|
|
|
|
const std::vector<size_t>& triangleToCellIdx,
|
|
|
|
const RigTernaryResultAccessor* resultAccessor,
|
|
|
|
const RivTernaryResultToTextureMapper* texMapper );
|
2014-08-11 01:10:07 -05:00
|
|
|
|
2014-08-11 03:50:31 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::cref<cvf::StructGridQuadToCellFaceMapper> m_quadMapper;
|
|
|
|
cvf::ref<RigTernaryResultAccessor> m_resultAccessor;
|
|
|
|
cvf::ref<RivTernaryResultToTextureMapper> m_texMapper;
|
2014-08-11 01:10:07 -05:00
|
|
|
};
|