Description

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)
 Method to allow serialization of transient data to archives.
 
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

◆ ChColor()

chrono::ChColor::ChColor ( )
inline

alpha channel (0,1)

Constructors

Member Function Documentation

◆ ComputeFalseColor()

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

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.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/assets/ChColor.h
  • /builds/uwsbel/chrono/src/chrono/assets/ChColor.cpp