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