Simox  2.3.50
VirtualRobot::ColorMap Class Reference

Data Structures

struct  ColorKey
 

Public Types

enum  type {
  eIntensity, eHot, eRed, eGreen,
  eBlue, eHotAlpha, eRedAlpha, eBlueAlpha,
  eGreenAlpha
}
 

Public Member Functions

 ColorMap (type t)
 
virtual ~ColorMap ()
 
VirtualRobot::VisualizationFactory::Color getColor (float position) const
 
bool getColor (float position, VirtualRobot::VisualizationFactory::Color &storeColor) const
 

Static Public Member Functions

static ColorMap customColorMap (std::vector< VirtualRobot::VisualizationFactory::Color > colors)
 Custom color maps can be created with this method. More...
 

Protected Member Functions

 ColorMap ()
 
bool addColorKey (const unsigned char R, const unsigned char G, const unsigned char B, const unsigned char A, const float Position)
 
void create (type t)
 
void sort ()
 

Static Protected Member Functions

static bool CompareColorKey (const ColorKey &lhs, const ColorKey &rhs)
 

Protected Attributes

std::vector< ColorKeycolorKeys
 
std::vector< float > intervals
 
type colorMapType
 

Member Enumeration Documentation

Enumerator
eIntensity 
eHot 
eRed 
eGreen 
eBlue 
eHotAlpha 
eRedAlpha 
eBlueAlpha 
eGreenAlpha 

Constructor & Destructor Documentation

VirtualRobot::ColorMap::ColorMap ( type  t)
VirtualRobot::ColorMap::~ColorMap ( )
virtual
VirtualRobot::ColorMap::ColorMap ( )
protected

Member Function Documentation

bool VirtualRobot::ColorMap::addColorKey ( const unsigned char  R,
const unsigned char  G,
const unsigned char  B,
const unsigned char  A,
const float  Position 
)
protected
bool VirtualRobot::ColorMap::CompareColorKey ( const ColorKey lhs,
const ColorKey rhs 
)
staticprotected
void VirtualRobot::ColorMap::create ( type  t)
protected
ColorMap VirtualRobot::ColorMap::customColorMap ( std::vector< VirtualRobot::VisualizationFactory::Color colors)
static

Custom color maps can be created with this method.

VirtualRobot::VisualizationFactory::Color VirtualRobot::ColorMap::getColor ( float  position) const

Returns color that is equivalent to position.

Parameters
positionA value between 0 and 1.
Returns
The corresponding color values (r,g,b,transparency values are in [0..1])
bool VirtualRobot::ColorMap::getColor ( float  position,
VirtualRobot::VisualizationFactory::Color storeColor 
) const
void VirtualRobot::ColorMap::sort ( )
protected

Field Documentation

std::vector<ColorKey> VirtualRobot::ColorMap::colorKeys
protected
type VirtualRobot::ColorMap::colorMapType
protected
std::vector<float> VirtualRobot::ColorMap::intervals
protected