Issue/2985 - Add asset with default cmaps (#3004)

* Allow changing color map during runtime

* Stary building asset with colormaps (currently using local files)

* Add option to invert the color maps

* Remove final use of local viridis file in example and fix broken cmap update

* Use synced resource for colormap files

* Update advanced colormapping example

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Update data/assets/util/default_colormaps.asset

* Capitalize first letter of exported keys, to be more consistent with rest of code base

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2024-02-05 15:47:25 +01:00
committed by GitHub
parent 2406a886ec
commit 2323a8ce50
9 changed files with 268 additions and 268 deletions
@@ -70,11 +70,14 @@ public:
*/
void initializeTexture();
void update(const dataloader::Dataset& dataset);
static documentation::Documentation Documentation();
glm::vec4 colorFromColorMap(float value) const;
properties::BoolProperty enabled;
properties::BoolProperty invert;
properties::OptionProperty dataColumn;
properties::StringProperty colorMapFile;
properties::Vec2Property valueRange;
@@ -110,6 +113,9 @@ private:
bool _hasNanColorInAsset = false;
bool _hasBelowRangeColorInAsset = false;
bool _hasAboveRangeColorInAsset = false;
bool _colorMapFileIsDirty = true;
bool _colorMapTextureIsDirty = true;
};
} // namespace openspace