(#166) Added support for ternary result mapping

Removed obsolete interface RigResultAccessor2d
This commit is contained in:
Magne Sjaastad
2015-11-23 15:24:03 +01:00
parent 95f500fefd
commit 6cd4e8a0b7
7 changed files with 144 additions and 62 deletions

View File

@@ -41,20 +41,31 @@ namespace cvf
class RivTernaryTextureCoordsCreator
{
public:
RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors,
RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig,
size_t timeStepIndex,
size_t gridIndex,
const cvf::StructGridQuadToCellFaceMapper* quadMapper);
RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig,
size_t timeStepIndex);
void createTextureCoords(cvf::Vec2fArray* quadTextureCoords);
void createTextureCoords(cvf::Vec2fArray* triTextureCoords, const std::vector<size_t>& triangleToCellIdx);
private:
void initData(RimEclipseCellColors* cellResultColors, RimTernaryLegendConfig* ternaryLegendConfig, size_t timeStepIndex, size_t gridIndex);
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);
private:
cvf::cref<cvf::StructGridQuadToCellFaceMapper> m_quadMapper;
cvf::ref<RigTernaryResultAccessor> m_resultAccessor;