MRPT
1.9.9
|
Manage R, G, B color triads and ask class instance of the next unique RGB combination.
Definition at line 23 of file TColorManager.h.
#include <mrpt/img/TColorManager.h>
Public Member Functions | |
TColorManager (bool use_standard_colors_first=true) | |
Constructor. More... | |
~TColorManager () | |
Destructor. More... | |
mrpt::img::TColorf | getNextTColorf () |
Get the next RGB triad in TColorf form. More... | |
mrpt::img::TColor | getNextTColor () |
Get the next RGB triad in TColor form. More... | |
bool | checkStdColorsUsed () |
Check if the standard colors have already been used. More... | |
Public Attributes | |
mrpt::img::TColor | curr_color |
std::set< mrpt::img::TColor > | used_colors |
bool | use_standard_colors_first |
Indicates if the standard colors are to be returned first. More... | |
bool | have_used_standard_colors |
Indicates if the standard colors have already been used. More... | |
uint8_t | color_step |
const uint8_t | color_thresh {255} |
bool | have_exceeded_colors |
Private Member Functions | |
void | reset () |
Reset all class properties to their default values. More... | |
void | advanceRGBCounters () |
void | markColorAsUsed (mrpt::img::TColor color) |
Mark the given color as used. More... | |
Private Attributes | |
mrpt::img::TColor | color_step_triad |
TColorManager::TColorManager | ( | bool | use_standard_colors_first = true | ) |
Constructor.
Definition at line 17 of file TColorManager.cpp.
|
default |
Destructor.
|
private |
Definition at line 74 of file TColorManager.cpp.
References ASSERT_, mrpt::img::TColor::blue(), mrpt::img::TColor::green(), mrpt::img::TColor::red(), and THROW_EXCEPTION.
bool TColorManager::checkStdColorsUsed | ( | ) |
Check if the standard colors have already been used.
True if they have indeed been used.
Definition at line 129 of file TColorManager.cpp.
References mrpt::img::TColor::blue(), mrpt::img::TColor::green(), and mrpt::img::TColor::red().
TColor TColorManager::getNextTColor | ( | ) |
Get the next RGB triad in TColor form.
Method automatically advances the current counters for RGB.
Definition at line 25 of file TColorManager.cpp.
References mrpt::img::TColor::blue(), mrpt::img::TColor::green(), and mrpt::img::TColor::red().
TColorf TColorManager::getNextTColorf | ( | ) |
Get the next RGB triad in TColorf form.
Method automatically advances the current counters for RGB.
Definition at line 69 of file TColorManager.cpp.
Referenced by mrpt::graphs::detail::CMRVisualizer< CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations, EDGE_ANNOTATIONS >::drawEdges(), and mrpt::graphs::detail::CMRVisualizer< CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations, EDGE_ANNOTATIONS >::drawNodePoints().
|
private |
|
private |
Reset all class properties to their default values.
Method called in the constructor of the class
Definition at line 117 of file TColorManager.cpp.
uint8_t mrpt::img::TColorManager::color_step |
Definition at line 61 of file TColorManager.h.
|
private |
Definition at line 68 of file TColorManager.h.
const uint8_t mrpt::img::TColorManager::color_thresh {255} |
Definition at line 62 of file TColorManager.h.
mrpt::img::TColor mrpt::img::TColorManager::curr_color |
Definition at line 40 of file TColorManager.h.
bool mrpt::img::TColorManager::have_exceeded_colors |
Definition at line 64 of file TColorManager.h.
bool mrpt::img::TColorManager::have_used_standard_colors |
Indicates if the standard colors have already been used.
This is a cached version of the value returned from the checkStdColorsUsed method.
Definition at line 54 of file TColorManager.h.
bool mrpt::img::TColorManager::use_standard_colors_first |
Indicates if the standard colors are to be returned first.
Definition at line 44 of file TColorManager.h.
std::set<mrpt::img::TColor> mrpt::img::TColorManager::used_colors |
Definition at line 41 of file TColorManager.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019 |