Public Member Functions | Protected Attributes | List of all members
robot_nav_rviz_plugins::SpectrumPalette Class Reference

Easy class to generate palettes that simply blend two colors together. More...

#include <spectrum_palette.h>

Inheritance diagram for robot_nav_rviz_plugins::SpectrumPalette:
Inheritance graph
[legend]

Public Member Functions

std::vector< color_util::ColorRGBA24getColors () const override
 The actual definition of the colors. More...
 
bool hasTransparency () const override
 See if the palette has any transparent colors. More...
 
 SpectrumPalette (const color_util::ColorRGBA24 &color_a, const color_util::ColorRGBA24 &color_b, bool transparent_minimum=true)
 Constructor for a blend of colors from color_a to color_b. More...
 
 SpectrumPalette (const color_util::ColorHSVA24 &color_a, const color_util::ColorHSVA24 &color_b, bool transparent_minimum=true)
 Constructor for a blend of colors from color_a to color_b. More...
 
- Public Member Functions inherited from robot_nav_rviz_plugins::NavGridPalette
virtual std::string getName () const =0
 Unique descriptive name for this particular palette. More...
 
virtual ~NavGridPalette ()
 

Protected Attributes

color_util::ColorHSVA color_a_
 
color_util::ColorHSVA color_b_
 
bool transparent_minimum_
 

Additional Inherited Members

- Static Public Attributes inherited from robot_nav_rviz_plugins::NavGridPalette
static const unsigned int NUM_CHANNELS = 4
 
static const unsigned int NUM_COLORS = 256
 

Detailed Description

Easy class to generate palettes that simply blend two colors together.

Implementing classes need only override the default constructor to call this class's constructor and the getName function.

Definition at line 49 of file spectrum_palette.h.

Constructor & Destructor Documentation

robot_nav_rviz_plugins::SpectrumPalette::SpectrumPalette ( const color_util::ColorRGBA24 color_a,
const color_util::ColorRGBA24 color_b,
bool  transparent_minimum = true 
)

Constructor for a blend of colors from color_a to color_b.

Parameters
color_aColor used for low values
color_bColor used for high values
transparent_minimumWhether the lowest value should be completely transparent

Definition at line 43 of file spectrum_palette.cpp.

robot_nav_rviz_plugins::SpectrumPalette::SpectrumPalette ( const color_util::ColorHSVA24 color_a,
const color_util::ColorHSVA24 color_b,
bool  transparent_minimum = true 
)

Constructor for a blend of colors from color_a to color_b.

Parameters
color_aColor used for low values
color_bColor used for high values
transparent_minimumWhether the lowest value should be completely transparent

Definition at line 52 of file spectrum_palette.cpp.

Member Function Documentation

std::vector< color_util::ColorRGBA24 > robot_nav_rviz_plugins::SpectrumPalette::getColors ( ) const
overridevirtual

The actual definition of the colors.

Returns
vector of up to 256 colors. Undefined behavior if more are returned.

Implements robot_nav_rviz_plugins::NavGridPalette.

Definition at line 67 of file spectrum_palette.cpp.

bool robot_nav_rviz_plugins::SpectrumPalette::hasTransparency ( ) const
overridevirtual

See if the palette has any transparent colors.

Can be overridden by implementing classes to save iterations

Reimplemented from robot_nav_rviz_plugins::NavGridPalette.

Definition at line 62 of file spectrum_palette.cpp.

Member Data Documentation

color_util::ColorHSVA robot_nav_rviz_plugins::SpectrumPalette::color_a_
protected

Definition at line 76 of file spectrum_palette.h.

color_util::ColorHSVA robot_nav_rviz_plugins::SpectrumPalette::color_b_
protected

Definition at line 76 of file spectrum_palette.h.

bool robot_nav_rviz_plugins::SpectrumPalette::transparent_minimum_
protected

Definition at line 77 of file spectrum_palette.h.


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


robot_nav_rviz_plugins
Author(s):
autogenerated on Sun Jan 10 2021 04:08:58