mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 15:29:26 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user