10 #ifndef mrpt_utils_tcolor_H
11 #define mrpt_utils_tcolor_H
33 constexpr
inline explicit TColor(
const unsigned int color_RGB_24bit)
53 inline operator unsigned int(
void)
const
55 return (((
unsigned int)
R) << 16) | (((
unsigned int)
G) << 8) |
B;
71 std::ostream&
operator<<(std::ostream& o,
const TColor&
c);
86 :
R(col.
R * (1.f / 255)),
87 G(col.
G * (1.f / 255)),
88 B(col.
B * (1.f / 255)),
89 A(col.
A * (1.f / 255))
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLclampf GLclampf GLclampf alpha
GLdouble GLdouble GLdouble r
TColor operator+(const TColor &first, const TColor &second)
Pairwise addition of their corresponding RGBA members.
bool operator==(const mrpt::utils::TCamera &a, const mrpt::utils::TCamera &b)
CStream & operator>>(mrpt::utils::CStream &in, char *a)
CStream & operator<<(mrpt::utils::CStream &s, const char *a)
TColor operator-(const TColor &first, const TColor &second)
Pairwise substraction of their corresponding RGBA members.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static constexpr TColor blue()
TColor & operator+=(const TColor &other)
static constexpr TColor red()
Predefined colors.
TColor & operator=(const TColor &other)
static constexpr TColor gray()
constexpr TColor(const unsigned int color_RGB_24bit)
constexpr TColor(const unsigned int color_RGB_24bit, const uint8_t alpha)
static constexpr TColor white()
TColor & operator-=(const TColor &other)
constexpr TColor(uint8_t r, uint8_t g, uint8_t b, uint8_t alpha=255)
static constexpr TColor black()
static constexpr TColor green()
A RGB color - floats in the range [0,1].
TColorf(const TColor &col)
TColorf(float r=0, float g=0, float b=0, float alpha=1.0f)