HOG2
|
A color; r/g/b are between 0...1. More...
#include <Colors.h>
Public Member Functions | |
rgbColor () | |
rgbColor (float rr, float gg, float bb) | |
rgbColor & | operator= (const rgbColor &)=default |
rgbColor & | operator*= (float p) |
rgbColor | operator* (float p) const |
rgbColor | operator+ (const rgbColor &c) const |
void | mix (const rgbColor &c, float perc) |
std::string | hex () const |
void | hex (const char *str) |
Static Public Member Functions | |
static rgbColor | mix (const rgbColor &c1, const rgbColor &c2, float perc) |
static rgbColor | hsl (float h, float s, float l) |
Public Attributes | |
float | r |
float | g |
float | b |
Private Member Functions | |
int | unhexdigit (char c) |
Static Private Member Functions | |
static float | hue2rgb (float p, float q, float t) |
|
inline |
|
inline |
Definition at line 52 of file Colors.h.
Referenced by Witness< width, height >::Deserialize(), Witness< width, height >::LoadFromHashString(), and WitnessRegionConstraint::operator std::string().
|
inline |
|
inlinestatic |
Definition at line 29 of file Colors.h.
References b, g, hue2rgb(), r, and rgbColor().
Referenced by HexagonEnvironment::Draw(), and Hexagon::Load().
|
inlinestaticprivate |
|
inline |
Definition at line 25 of file Colors.h.
References b, g, r, and rgbColor().
Referenced by SnakeBird::SnakeBird::Draw(), SnakeBird::SnakeBird::DrawObject(), SnakeBird::SnakeBird::DrawSnakeSegment(), and operator+().
|
inline |
|
inlineprivate |
float rgbColor::b |
Definition at line 71 of file Colors.h.
Referenced by TextBox::draw(), VoxelGrid::Draw(), CanonicalGrid::CanonicalGrid::Draw(), MapEnvironment::Draw(), CanonicalGrid::CanonicalGrid::DrawAlternate(), MapEnvironment::DrawAlternate(), CanonicalGrid::CanonicalGrid::DrawArrow(), MapEnvironment::DrawArrow(), CanonicalGrid::CanonicalGrid::DrawLine(), MapEnvironment::DrawLine(), CanonicalGrid::CanonicalGrid::DrawStateLabel(), MapEnvironment::DrawStateLabel(), Colors::GetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::GetColor(), VoxelGrid::GetImage(), hex(), hsl(), mix(), MapOverlay::OpenGLDraw(), VoxelGrid::OpenGLDraw(), AirplaneEnvironment::OpenGLDraw(), Voxels::OpenGLDraw(), Fling::OpenGLDraw(), operator*=(), operator==(), Plotting::Line::SetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::SetColor(), CanonicalGrid::CanonicalGrid::SVGDraw(), MapEnvironment::SVGDraw(), GraphEnvironment::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDrawLine(), MapEnvironment::SVGDrawLine(), CanonicalGrid::CanonicalGrid::SVGFrameRect(), MapEnvironment::SVGFrameRect(), SVGGetRGB(), CanonicalGrid::CanonicalGrid::SVGLabelState(), and MapEnvironment::SVGLabelState().
float rgbColor::g |
Definition at line 71 of file Colors.h.
Referenced by TextBox::draw(), VoxelGrid::Draw(), CanonicalGrid::CanonicalGrid::Draw(), MapEnvironment::Draw(), CanonicalGrid::CanonicalGrid::DrawAlternate(), MapEnvironment::DrawAlternate(), CanonicalGrid::CanonicalGrid::DrawArrow(), MapEnvironment::DrawArrow(), CanonicalGrid::CanonicalGrid::DrawLine(), MapEnvironment::DrawLine(), CanonicalGrid::CanonicalGrid::DrawStateLabel(), MapEnvironment::DrawStateLabel(), Colors::GetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::GetColor(), VoxelGrid::GetImage(), hex(), hsl(), mix(), MapOverlay::OpenGLDraw(), VoxelGrid::OpenGLDraw(), AirplaneEnvironment::OpenGLDraw(), Voxels::OpenGLDraw(), Fling::OpenGLDraw(), operator*=(), operator==(), Plotting::Line::SetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::SetColor(), CanonicalGrid::CanonicalGrid::SVGDraw(), MapEnvironment::SVGDraw(), GraphEnvironment::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDrawLine(), MapEnvironment::SVGDrawLine(), CanonicalGrid::CanonicalGrid::SVGFrameRect(), MapEnvironment::SVGFrameRect(), SVGGetRGB(), CanonicalGrid::CanonicalGrid::SVGLabelState(), and MapEnvironment::SVGLabelState().
float rgbColor::r |
Definition at line 71 of file Colors.h.
Referenced by TextBox::draw(), VoxelGrid::Draw(), CanonicalGrid::CanonicalGrid::Draw(), MapEnvironment::Draw(), CanonicalGrid::CanonicalGrid::DrawAlternate(), MapEnvironment::DrawAlternate(), CanonicalGrid::CanonicalGrid::DrawArrow(), MapEnvironment::DrawArrow(), CanonicalGrid::CanonicalGrid::DrawLine(), MapEnvironment::DrawLine(), CanonicalGrid::CanonicalGrid::DrawStateLabel(), MapEnvironment::DrawStateLabel(), Colors::GetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::GetColor(), VoxelGrid::GetImage(), hex(), hsl(), mix(), MapOverlay::OpenGLDraw(), VoxelGrid::OpenGLDraw(), AirplaneEnvironment::OpenGLDraw(), Voxels::OpenGLDraw(), Fling::OpenGLDraw(), operator*=(), operator==(), Plotting::Line::SetColor(), SearchEnvironment< RacetrackState, RacetrackMove >::SetColor(), CanonicalGrid::CanonicalGrid::SVGDraw(), MapEnvironment::SVGDraw(), GraphEnvironment::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDrawLine(), MapEnvironment::SVGDrawLine(), CanonicalGrid::CanonicalGrid::SVGFrameRect(), MapEnvironment::SVGFrameRect(), SVGGetRGB(), CanonicalGrid::CanonicalGrid::SVGLabelState(), and MapEnvironment::SVGLabelState().