2014-08-11 13:55:53 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-24 07:14:52 +02:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2014-08-11 13:55:53 +02: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
|
|
|
|
|
|
2018-10-31 16:09:14 +01:00
|
|
|
#include "RiaColorTables.h"
|
|
|
|
|
|
2014-08-21 14:41:03 +02:00
|
|
|
#include "cafEffectGenerator.h"
|
|
|
|
|
|
2014-08-11 15:21:37 +02:00
|
|
|
#include "cvfBase.h"
|
2014-08-11 13:55:53 +02:00
|
|
|
#include "cvfArray.h"
|
|
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
|
{
|
2015-10-23 15:46:25 +02:00
|
|
|
class ScalarMapper;
|
|
|
|
|
class Part;
|
|
|
|
|
class Effect;
|
|
|
|
|
class StructGridQuadToCellFaceMapper;
|
|
|
|
|
class DrawableGeo;
|
2014-08-11 13:55:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class RivTernaryScalarMapper;
|
2015-06-25 12:04:46 +02:00
|
|
|
class RimEclipseCellColors;
|
2015-06-25 13:41:55 +02:00
|
|
|
class RimCellEdgeColors;
|
2014-08-11 13:55:53 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RivScalarMapperUtils
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-10-31 16:09:14 +01:00
|
|
|
static void applyTextureResultsToPart(cvf::Part* part, cvf::Vec2fArray* textureCoords, const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting, const cvf::Color3f& undefColor = cvf::Color3f(RiaColorTables::undefinedCellColor()));
|
2015-06-17 15:00:20 +02:00
|
|
|
static void applyTernaryTextureResultsToPart(cvf::Part* part, cvf::Vec2fArray* textureCoords, const RivTernaryScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting);
|
2014-08-11 13:55:53 +02:00
|
|
|
|
2015-10-23 15:46:25 +02:00
|
|
|
static cvf::ref<cvf::Effect> createCellEdgeEffect(cvf::DrawableGeo* dg,
|
|
|
|
|
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper,
|
|
|
|
|
size_t gridIndex,
|
|
|
|
|
size_t timeStepIndex,
|
|
|
|
|
RimEclipseCellColors* cellResultColors,
|
|
|
|
|
RimCellEdgeColors* cellEdgeResultColors,
|
|
|
|
|
float opacityLevel,
|
2014-08-21 14:41:03 +02:00
|
|
|
cvf::Color3f defaultColor,
|
2015-06-17 15:00:20 +02:00
|
|
|
caf::FaceCulling faceCulling,
|
|
|
|
|
bool disableLighting);
|
2014-08-13 10:45:09 +02:00
|
|
|
|
2014-08-11 13:55:53 +02:00
|
|
|
private:
|
2018-10-31 16:09:14 +01:00
|
|
|
static cvf::ref<cvf::Effect> createScalarMapperEffect(const cvf::ScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting, const cvf::Color3f& undefColor = cvf::Color3f(RiaColorTables::undefinedCellColor()));
|
2015-06-17 15:00:20 +02:00
|
|
|
static cvf::ref<cvf::Effect> createTernaryScalarMapperEffect(const RivTernaryScalarMapper* mapper, float opacityLevel, caf::FaceCulling faceCulling, bool disableLighting);
|
2014-08-11 13:55:53 +02:00
|
|
|
};
|
|
|
|
|
|