Classes |
Public Types |
Public Member Functions |
Static Public Member Functions |
List of all members
chrono::ChColormap Class Reference
Description
Definition of a color map.
#include <ChColormap.h>
Classes | |
struct | Files |
Names of colormap definition files. More... | |
Public Types | |
enum | Type { BLACK_BODY, BROWN, COPPER, FAST, INFERNO, JET, KINDLMANN, PLASMA, RED_BLUE, VIRIDIS } |
Colormap type. More... | |
Public Member Functions | |
ChColormap (Type type=Type::JET) | |
Construct a colormap of specified type. | |
void | Load (Type type) |
Load data for the specified colormap, replacing current data. | |
ChColor | Get (double value) const |
Return a color corresponding to the provided value, assumed in [0,1]. More... | |
ChColor | Get (double value, double vmin, double vmax) const |
Return a color corresponding to the provided value, assumed in [vmin,vmax]. More... | |
void | ArchiveOut (ChArchiveOut &archive_out) |
Method to allow serialization of transient data to archives. | |
void | ArchiveIn (ChArchiveIn &archive_in) |
Method to allow de-serialization of transient data from archives. | |
Static Public Member Functions | |
static const std::string & | GetDataFilename (Type type) |
Return the image filename for the specified colormap type. | |
static const std::string & | GetImageFilename (Type type) |
Return the image filename for the specified colormap type. | |
static const std::unordered_map< Type, Files > & | GetFilenames () |
Return the list of specification files for all available colormaps. | |
Member Enumeration Documentation
◆ Type
|
strong |
Colormap type.
Data obtained from https://www.kennethmoreland.com/color-advice/
Member Function Documentation
◆ Get() [1/2]
ChColor chrono::ChColormap::Get | ( | double | value | ) | const |
Return a color corresponding to the provided value, assumed in [0,1].
The output color is obtained by linear interpolation in the current colormap table. Out of range input values are clamped to [0,1].
◆ Get() [2/2]
ChColor chrono::ChColormap::Get | ( | double | value, |
double | vmin, | ||
double | vmax | ||
) | const |
Return a color corresponding to the provided value, assumed in [vmin,vmax].
The output color is obtained by linear interpolation in the current colormap table. Out of range input values are clamped to [vmin,vmax].
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/assets/ChColormap.h
- /builds/uwsbel/chrono/src/chrono/assets/ChColormap.cpp