Description

Definition of a visual color.

The red (R), green (G), and blue (B) channels take values between 0 and 1.

#include <ChColor.h>

Public Member Functions

 ChColor (float red, float green, float blue)
 
 ChColor (const ChColor &other)
 
ChColoroperator= (const ChColor &other)
 
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 ChVector3f RGB2HSV (const ChColor &rgb)
 Convert to HSV.
 
static ChColor HSV2RGB (const ChVector3f &hsv)
 Set from HSV.
 
static ChColor Interp (const ChColor &c1, const ChColor &c2, double f)
 Interpolate between two colors. More...
 

Public Attributes

float R
 red channel [0,1]
 
float G
 green channel [0,1]
 
float B
 blue channel [0,1]
 

Member Function Documentation

◆ Interp()

ChColor chrono::ChColor::Interp ( const ChColor c1,
const ChColor c2,
double  f 
)
static

Interpolate between two colors.

The interpolation fraction f must be in [0,1].


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