MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions
MFM::ColorMap Class Referenceabstract

#include <ColorMap.h>

Public Member Functions

u32 GetSelectedColor (float value, float min, float max, u32 badColor) const
 
u32 GetInterpolatedColor (float value, float min, float max, u32 badColor) const
 

Static Public Member Functions

static u32 GetMapCount ()
 
static ColorMapGetMap (u32 index)
 

Detailed Description

A bunch of color scales and gradients for heat-map and similar types of displays. Based on suggestions from colorbrewer2.org, restricting to 'colorblind safe' and 'print friendly' choices. We include samples of 'sequential', 'diverging', and 'qualitative' palettes (see colorbrewer2.org for details), and both sets of five colors, which have a distinguished center color, and sets of six colors, which have a distinguished center 'break' between two colors

Member Function Documentation

u32 MFM::ColorMap::GetInterpolatedColor ( float  value,
float  min,
float  max,
u32  badColor 
) const

Map value, which must be in the range of min..max to a color interpolated linearly between five or six different colors equally spaced from min to max. If max<=min or value is out of range, return badColor.

ColorMap & MFM::ColorMap::GetMap ( u32  index)
static

Gets the ColorMap loaded into the system at a specified index.

Parameters
indexThe index of the ColorMap to retrieve.
Returns
The ColorMap loaded into the system at index .
u32 MFM::ColorMap::GetMapCount ( )
static

Gets the number of ColorMaps loaded into the system.

Returns
The number of ColorMaps loaded into the system.
u32 MFM::ColorMap::GetSelectedColor ( float  value,
float  min,
float  max,
u32  badColor 
) const

Map value, which must be in the range of min..max to one of five different colors. If max<=min or value is out of range, return badColor. Only five or six different colors (plus possibly badColor) will be returned by this function.


The documentation for this class was generated from the following files: