mc_rtc::utils Namespace Reference

Functions

template<typename T >
heatmap (double minimum, double maximum, double value)
 Compute rgb heatmap colors expressed between 0 and 1. More...
 

Function Documentation

◆ heatmap()

template<typename T >
T mc_rtc::utils::heatmap ( double  minimum,
double  maximum,
double  value 
)

Compute rgb heatmap colors expressed between 0 and 1.

Minimum value is represented as pure blue Maximum value is represented as pure red In-between values vary between blue and red

Parameters
minimumMinimum value that the heatmap should represent
maximumMaximum value that the heatmap should represent
valueCurrent value in [minimum, maximum] range. Values outside of this range will be displayed as either blue or red.
Returns
[r,g,b] values