FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle::Col Struct Reference

A struct holding an RGB8 color. More...

#include <Frame.h>

Public Member Functions

bool operator== (const Col &other) const
 Returns whether two colors are identical.
bool operator!= (const Col &other) const
 Returns whether two colors differ.
bool operator< (const Col &other) const
 Orders colors lexicographically by RGB channels.

Static Public Member Functions

static Col FromFloat3 (const float *f)
 Converts a normalized RGB float triplet into an 8-bit color.

Public Attributes

unsigned char r = 255
 Red channel in 8-bit RGB space.
unsigned char g = 255
 Green channel in 8-bit RGB space.
unsigned char b = 255
 Blue channel in 8-bit RGB space.

Friends

std::ostream & operator<< (std::ostream &stream, const Col &col)
 Streams a color in human-readable form.

Detailed Description

A struct holding an RGB8 color.

Member Function Documentation

◆ FromFloat3()

Col FuncDoodle::Col::FromFloat3 ( const float * f)
inlinestatic

Converts a normalized RGB float triplet into an 8-bit color.

Parameters
fPointer to three normalized RGB float values.
Returns
Converted 8-bit RGB color.

◆ operator!=()

bool FuncDoodle::Col::operator!= ( const Col & other) const
inline

Returns whether two colors differ.

Parameters
otherColor to compare against.
Returns
Whether the colors differ.

◆ operator<()

bool FuncDoodle::Col::operator< ( const Col & other) const
inline

Orders colors lexicographically by RGB channels.

Parameters
otherColor to compare against.
Returns
Whether this color sorts before other.

◆ operator==()

bool FuncDoodle::Col::operator== ( const Col & other) const
inline

Returns whether two colors are identical.

Parameters
otherColor to compare against.
Returns
Whether both colors match.

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const Col & col )
friend

Streams a color in human-readable form.

Parameters
streamOutput stream to write into.
colColor value to serialize.
Returns
Reference to stream.

Member Data Documentation

◆ b

unsigned char FuncDoodle::Col::b = 255

Blue channel in 8-bit RGB space.

◆ g

unsigned char FuncDoodle::Col::g = 255

Green channel in 8-bit RGB space.

◆ r

unsigned char FuncDoodle::Col::r = 255

Red channel in 8-bit RGB space.


The documentation for this struct was generated from the following file: