2016-09-06 03:27:30 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-09-06 03:27:30 -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
|
|
|
//
|
2016-09-06 03:27:30 -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>
|
2016-09-06 03:27:30 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2020-04-30 09:54:25 -05:00
|
|
|
#include "cvfColor3.h"
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
class RigFormationNames : public cvf::Object
|
2016-09-06 03:27:30 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigFormationNames();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RigFormationNames() override;
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2020-01-03 02:59:38 -06:00
|
|
|
int formationIndexFromKLayerIdx( size_t Kidx ) const
|
2016-09-06 03:27:30 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( Kidx >= m_nameIndexPrKLayer.size() ) return -1;
|
2016-09-06 03:27:30 -05:00
|
|
|
return m_nameIndexPrKLayer[Kidx];
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString formationNameFromKLayerIdx( size_t Kidx );
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2020-04-30 09:54:25 -05:00
|
|
|
bool formationColorFromKLayerIdx( size_t Kidx, cvf::Color3f* formationColor );
|
|
|
|
|
|
|
|
const std::vector<QString>& formationNames() const { return m_formationNames; }
|
|
|
|
const std::vector<cvf::Color3f>& formationColors() const { return m_formationColors; }
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void appendFormationRange( const QString& name, int kStartIdx, int kEndIdx );
|
|
|
|
void appendFormationRangeHeight( const QString& name, int kLayerCount );
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2020-04-30 09:54:25 -05:00
|
|
|
void appendFormationRange( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx );
|
|
|
|
void appendFormationRangeHeight( const QString& name, cvf::Color3f color, int kLayerCount );
|
|
|
|
|
|
|
|
private:
|
|
|
|
static cvf::Color3f undefinedColor();
|
2023-02-26 03:48:40 -06:00
|
|
|
void appendFormationRangeWithColor( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx );
|
2020-04-30 09:54:25 -05:00
|
|
|
|
2016-09-06 03:27:30 -05:00
|
|
|
private:
|
2020-04-30 09:54:25 -05:00
|
|
|
std::vector<int> m_nameIndexPrKLayer;
|
|
|
|
std::vector<QString> m_formationNames;
|
|
|
|
std::vector<cvf::Color3f> m_formationColors; // optional color per formation
|
2016-09-06 03:27:30 -05:00
|
|
|
};
|