Main MRPT website > C++ reference for MRPT 1.9.9
TColorManager.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/img/TColor.h>
12 #include <utility>
13 #include <set>
14 #include <cstdlib>
15 #include <iostream>
16 
17 namespace mrpt
18 {
19 namespace img
20 {
21 // TODO - finish this.
22 /**\brief Manage R, G, B color triads and ask class instance of the next
23  * unique RGB combination.
24  */
26 {
27  public:
28  /**\brief Constructor */
30  /**\brief Destructor */
32  /**\brief Get the next RGB triad in TColorf form.
33  *
34  * Method automatically advances the current counters for RGB.
35  */
37  /**\brief Get the next RGB triad in TColor form.
38  *
39  * Method automatically advances the current counters for RGB.
40  */
43  std::set<mrpt::img::TColor> used_colors;
44  /** Indicates if the standard colors are to be returned first.
45  */
47  /** Indicates if the standard colors have already been used.
48  *
49  * This is a cached version of the value returned from the
50  * checkStdColorsUsed method.
51  *
52  * \note Standard colors are: red, green, blue
53  *
54  * \sa checkStdColorsUsed
55  */
57  /**\brief Check if the standard colors have already been used.
58  *
59  * \ret True if they have indeed been used.
60  */
61  bool checkStdColorsUsed();
62 
65 
67 
68  private:
69  // color triad with which to advance the current TColor instance
71 
72  /**\brief Reset all class properties to their default values
73  *
74  * Method called in the constructor of the class
75  */
76  void reset();
77  void advanceRGBCounters();
78  /**\brief Mark the given color as used. */
80 };
81 } // namespace img
82 } // namespace mrpt
mrpt::img::TColorManager::use_standard_colors_first
bool use_standard_colors_first
Indicates if the standard colors are to be returned first.
Definition: TColorManager.h:46
mrpt::img::TColorManager::reset
void reset()
Reset all class properties to their default values.
Definition: TColorManager.cpp:116
mrpt::img::TColorManager::~TColorManager
~TColorManager()
Destructor.
Definition: TColorManager.cpp:23
mrpt::img::TColorManager::have_used_standard_colors
bool have_used_standard_colors
Indicates if the standard colors have already been used.
Definition: TColorManager.h:56
mrpt::img::TColorManager::color_step_triad
mrpt::img::TColor color_step_triad
Definition: TColorManager.h:70
mrpt::img::TColorManager::TColorManager
TColorManager(bool use_standard_colors_first=true)
Constructor.
Definition: TColorManager.cpp:16
mrpt::img::TColorManager::color_thresh
const uint8_t color_thresh
Definition: TColorManager.h:64
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
uint8_t
unsigned char uint8_t
Definition: rptypes.h:41
mrpt::img::TColorManager::color_step
uint8_t color_step
Definition: TColorManager.h:63
mrpt::img::TColorManager::curr_color
mrpt::img::TColor curr_color
Definition: TColorManager.h:42
mrpt::img::TColorManager::used_colors
std::set< mrpt::img::TColor > used_colors
Definition: TColorManager.h:43
mrpt::img::TColorManager::getNextTColorf
mrpt::img::TColorf getNextTColorf()
Get the next RGB triad in TColorf form.
Definition: TColorManager.cpp:68
mrpt::img::TColorManager::have_exceeded_colors
bool have_exceeded_colors
Definition: TColorManager.h:66
mrpt::img::TColorf
A RGB color - floats in the range [0,1].
Definition: TColor.h:79
mrpt::img::TColor
A RGB color - 8bit.
Definition: TColor.h:22
color
GLuint color
Definition: glext.h:8300
mrpt::img::TColorManager::getNextTColor
mrpt::img::TColor getNextTColor()
Get the next RGB triad in TColor form.
Definition: TColorManager.cpp:24
mrpt::img::TColorManager::checkStdColorsUsed
bool checkStdColorsUsed()
Check if the standard colors have already been used.
Definition: TColorManager.cpp:128
img
GLint GLvoid * img
Definition: glext.h:3763
mrpt::img::TColorManager
Manage R, G, B color triads and ask class instance of the next unique RGB combination.
Definition: TColorManager.h:25
mrpt::img::TColorManager::advanceRGBCounters
void advanceRGBCounters()
Definition: TColorManager.cpp:73
mrpt::img::TColorManager::markColorAsUsed
void markColorAsUsed(mrpt::img::TColor color)
Mark the given color as used.
Definition: TColorManager.cpp:107
TColor.h



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST