Class for setting a color (used by ChVisualization)

#include <ChColor.h>

Public Member Functions

 ChColor ()
 alpha channel (0,1) More...
 ChColor (float mR, float mG, float mB, float mA=0)
 ChColor (const ChColor &other)
ChColoroperator= (const ChColor &other)
 Assignment: copy from another color.
virtual void ArchiveOUT (ChArchiveOut &marchive)
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de serialization of transient data from archives.

Static Public Member Functions

static ChColor ComputeFalseColor (double v, double vmin, double vmax, bool out_of_range_as_bw=false)
 Compute a false color from a scalar value. More...

Public Attributes

float R
float G
 red channel (0,1)
float B
 green channel (0,1)
float A
 blue channel (0,1)

Constructor & Destructor Documentation

chrono::ChColor::ChColor ( )

alpha channel (0,1)


Member Function Documentation

ChColor chrono::ChColor::ComputeFalseColor ( double  v,
double  vmin,
double  vmax,
bool  out_of_range_as_bw = false 

Compute a false color from a scalar value.

Uses a cold-to-hot colormap. The 'v' scalar value is mapped in the vmin-vmax range. If out_of_range_as_bw option is true, when v>vmax the color is white and for v<vmin the color is black.