diff --git a/ApplicationCode/ModelVisualization/CMakeLists_files.cmake b/ApplicationCode/ModelVisualization/CMakeLists_files.cmake index 1020c633d5..8413a830a1 100644 --- a/ApplicationCode/ModelVisualization/CMakeLists_files.cmake +++ b/ApplicationCode/ModelVisualization/CMakeLists_files.cmake @@ -6,7 +6,6 @@ endif() set (SOURCE_GROUP_HEADER_FILES ${CEE_CURRENT_LIST_DIR}RivCellEdgeEffectGenerator.h -${CEE_CURRENT_LIST_DIR}RivColorTableArray.h ${CEE_CURRENT_LIST_DIR}RivFaultPartMgr.h ${CEE_CURRENT_LIST_DIR}RivFaultGeometryGenerator.h ${CEE_CURRENT_LIST_DIR}RivNNCGeometryGenerator.h @@ -40,7 +39,6 @@ ${CEE_CURRENT_LIST_DIR}RivWellSpheresPartMgr.h set (SOURCE_GROUP_SOURCE_FILES ${CEE_CURRENT_LIST_DIR}RivCellEdgeEffectGenerator.cpp -${CEE_CURRENT_LIST_DIR}RivColorTableArray.cpp ${CEE_CURRENT_LIST_DIR}RivFaultPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivNNCGeometryGenerator.cpp ${CEE_CURRENT_LIST_DIR}RivFaultGeometryGenerator.cpp diff --git a/ApplicationCode/ModelVisualization/RivColorTableArray.cpp b/ApplicationCode/ModelVisualization/RivColorTableArray.cpp deleted file mode 100644 index a3a6f60d28..0000000000 --- a/ApplicationCode/ModelVisualization/RivColorTableArray.cpp +++ /dev/null @@ -1,44 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Statoil ASA -// Copyright (C) Ceetron Solutions AS -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RivColorTableArray.h" - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -cvf::ref RivColorTableArray::colorTableArray() -{ - cvf::ref partColors = new cvf::Color3fArray(); - partColors->reserve(10); - - partColors->add(cvf::Color3f(101.0f/255, 132.0f/255, 96.0f/255)); // Dark green - partColors->add(cvf::Color3f(255.0f/255, 131.0f/255, 140.0f/255)); // Old pink - partColors->add(cvf::Color3f(210.0f/255, 176.0f/255, 112.0f/255)); // Light Brown - partColors->add(cvf::Color3f(140.0f/255, 171.0f/255, 238.0f/255)); // Light gray blue - partColors->add(cvf::Color3f(255.0f/255, 205.0f/255, 131.0f/255)); // Peach - partColors->add(cvf::Color3f(220.0f/255, 212.0f/255, 166.0f/255)); // Dark off white - partColors->add(cvf::Color3f(130.0f/255, 255.0f/255, 120.0f/255)); // Light green - partColors->add(cvf::Color3f(166.0f/255, 220.0f/255, 215.0f/255)); // Light gray torquise - partColors->add(cvf::Color3f(168.0f/255, 220.0f/255, 166.0f/255)); // Light gray green - partColors->add(cvf::Color3f(255.0f/255, 64.0f/255, 236.0f/255)); // Magneta - - return partColors; -} - diff --git a/ApplicationCode/ModelVisualization/RivColorTableArray.h b/ApplicationCode/ModelVisualization/RivColorTableArray.h deleted file mode 100644 index df59373f25..0000000000 --- a/ApplicationCode/ModelVisualization/RivColorTableArray.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Statoil ASA -// Copyright (C) Ceetron Solutions AS -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cvfBase.h" -#include "cvfObject.h" -#include "cvfArray.h" - -class RivColorTableArray -{ -public: - static cvf::ref colorTableArray(); -}; diff --git a/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp b/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp index f30daa33ac..41ee263800 100644 --- a/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp @@ -21,6 +21,7 @@ #include "RiaApplication.h" #include "RiaPreferences.h" +#include "RiaColorTables.h" #include "RigMainGrid.h" @@ -32,8 +33,6 @@ #include "RiuMainWindow.h" -#include "RivColorTableArray.h" - #include "cafAppEnum.h" #include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfMat4d.h" @@ -187,7 +186,7 @@ void RimFaultCollection::syncronizeFaults() { if (!(m_reservoirView && m_reservoirView->mainGrid()) ) return; - cvf::ref partColors = RivColorTableArray::colorTableArray(); + const caf::ColorTable& colorTable = RiaColorTables::faultsPaletteColors(); const cvf::Collection constRigFaults = m_reservoirView->mainGrid()->faults(); @@ -246,7 +245,7 @@ void RimFaultCollection::syncronizeFaults() if (!rimFault) { rimFault = new RimFault(); - rimFault->faultColor = partColors->get(fIdx % partColors->size()); + rimFault->faultColor = colorTable.cycledColor3f(fIdx); QString faultName = rigFaults[fIdx]->name(); if (faultName.startsWith(RimDefines::undefinedGridFaultName(), Qt::CaseInsensitive)