/** * File: noiseGenNoiseData.cc * Copyright (C) 2025 Tyler Triplett * License: GNU GPL 3.0 or later <https://www.gnu.org/licenses/gpl-3.0.html> * * This 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. * * This program 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 for more details. */ #include <generators/noiseGen.hh> namespace ty { noiseGen::noiseData::noiseData() : colors_(3, std::make_pair(0, 255)) { } noiseGen::noiseData::~noiseData() { } size_t noiseGen::noiseData::atColor(const char& c) const { switch(c) { case 'r': { return 0; } case 'g': { return 1; } case 'b': { } default : { return 2; } } } noiseGen::colorRange& noiseGen::noiseData::operator[](const char& c) { return colors_[atColor(c)]; } const noiseGen::colorRange& noiseGen::noiseData::operator[](const char& c) const { return colors_[atColor(c)]; } } /// ty