|
| Colormap (std::string name) |
| Create a colormap.
|
|
float | textureOffset () |
| Calculate the y-offset of the colormap in the colormap texture.
|
|
glm::vec3 | operator() (float value) |
| Apply the colormap.
|
|
|
static void | init () |
| Load the colormaps from resources/colormaps.png and resources/colormaps.txt.
|
|
|
static ResourceManager::Image | colormaps |
| All colormaps in on texture, line by line.
|
|
◆ Colormap()
Colormap::Colormap |
( |
std::string |
name | ) |
|
Create a colormap.
- Parameters
-
name | The name of the colormap. All colormaps from matplotlib are available, for more info look into resources/colormaps.txt |
Common colormaps are: hot, gray, viridis, plasma, inferno, magma, cividis...
◆ init()
Load the colormaps from resources/colormaps.png and resources/colormaps.txt.
Only has to be called once, this happens automatically when the first colormap is created.
◆ operator()()
glm::vec3 Colormap::operator() |
( |
float |
value | ) |
|
Apply the colormap.
- Parameters
-
value | The value to apply the colormap to. values will be clamped to [0, 1] |
- Returns
- The color of the value in the colormap
◆ textureOffset()
float Colormap::textureOffset |
( |
| ) |
|
Calculate the y-offset of the colormap in the colormap texture.
- Returns
- The y-offset of the colormap in the colormap texture. Range: [0, 1]
The documentation for this class was generated from the following files: