Public Member Functions | Private Member Functions | Private Attributes | List of all members
lvr2::ColorMap Class Reference

#include <ColorMap.hpp>

Public Member Functions

 ColorMap (size_t buckets)
 Ctor. Constructs a color gradient with the given number of buckets. More...
 
void getColor (float *color, size_t bucket, GradientType gradient=GREY)
 Returns three float values for the color of the given bucket. More...
 
virtual ~ColorMap ()
 Dtor. More...
 

Private Member Functions

void calcColorGrey (float *color, size_t bucket)
 Returns a color from a gray gradient. More...
 
void calcColorHot (float *color, size_t bucket)
 Returns a color from a hot gradient. More...
 
void calcColorHSV (float *color, size_t bucket)
 Returns a color from a HSV gradient. More...
 
void calcColorJet (float *color, size_t bucket)
 Returns a color from a Jet gradient. More...
 
void calcColorSHSV (float *color, size_t bucket)
 Returns a color from a SHSV gradient. More...
 
void calcColorSimpsons (float *color, size_t bucket)
 Returns a color from a Simpsons gradient. More...
 
void convertHSVToRGB (float hue, float s, float v, float &r, float &g, float &b)
 Converts the given color in HSV space into RGB space. More...
 

Private Attributes

size_t m_numBuckets
 Number of colors in the color gradient. More...
 

Detailed Description

Definition at line 65 of file ColorMap.hpp.

Constructor & Destructor Documentation

◆ ColorMap()

lvr2::ColorMap::ColorMap ( size_t  buckets)
inline

Ctor. Constructs a color gradient with the given number of buckets.

Parameters
bucketsNumber of colors in current gradient

Definition at line 75 of file ColorMap.hpp.

◆ ~ColorMap()

virtual lvr2::ColorMap::~ColorMap ( )
inlinevirtual

Dtor.

Definition at line 80 of file ColorMap.hpp.

Member Function Documentation

◆ calcColorGrey()

void lvr2::ColorMap::calcColorGrey ( float *  color,
size_t  bucket 
)
private

Returns a color from a gray gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 83 of file ColorMap.cpp.

◆ calcColorHot()

void lvr2::ColorMap::calcColorHot ( float *  color,
size_t  bucket 
)
private

Returns a color from a hot gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 103 of file ColorMap.cpp.

◆ calcColorHSV()

void lvr2::ColorMap::calcColorHSV ( float *  color,
size_t  bucket 
)
private

Returns a color from a HSV gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 90 of file ColorMap.cpp.

◆ calcColorJet()

void lvr2::ColorMap::calcColorJet ( float *  color,
size_t  bucket 
)
private

Returns a color from a Jet gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 115 of file ColorMap.cpp.

◆ calcColorSHSV()

void lvr2::ColorMap::calcColorSHSV ( float *  color,
size_t  bucket 
)
private

Returns a color from a SHSV gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 97 of file ColorMap.cpp.

◆ calcColorSimpsons()

void lvr2::ColorMap::calcColorSimpsons ( float *  color,
size_t  bucket 
)
private

Returns a color from a Simpsons gradient.

Parameters
colorThe three color components
bucketThe bucket index

Definition at line 76 of file ColorMap.cpp.

◆ convertHSVToRGB()

void lvr2::ColorMap::convertHSVToRGB ( float  hue,
float  s,
float  v,
float &  r,
float &  g,
float &  b 
)
private

Converts the given color in HSV space into RGB space.

Parameters
hueHue component of input color
sSaturation component of input color
vValue component of input color
rConverted red component
gConverted green component
bConverted blue component

Definition at line 131 of file ColorMap.cpp.

◆ getColor()

void lvr2::ColorMap::getColor ( float *  color,
size_t  bucket,
GradientType  gradient = GREY 
)

Returns three float values for the color of the given bucket.

Parameters
colorThe three color components
bucketThe bucket index
gradientThe type of gradient (default grey)

Definition at line 43 of file ColorMap.cpp.

Member Data Documentation

◆ m_numBuckets

size_t lvr2::ColorMap::m_numBuckets
private

Number of colors in the color gradient.

Definition at line 154 of file ColorMap.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27