![]() |
nCine
2025.04.r498-9d36345
A cross-platform 2D game engine
|
A three channels unclamped float color. More...
#include <ColorHdr.h>
Public Member Functions | |
ColorHdr () | |
Default constructor (white color) | |
ColorHdr (float red, float green, float blue) | |
Three channels constructor. | |
ColorHdr (const float channels[NumChannels]) | |
Three channels constructor from an array. | |
ColorHdr (const Colorf &color) | |
Constructor taking a float color. | |
float | r () const |
Gets the red channel of the color. | |
float | g () const |
Gets the green channel of the color. | |
float | b () const |
Gets the blue channel of the color. | |
const float * | data () const |
Gets the color array. | |
float * | data () |
Gets the color array. | |
void | set (float red, float green, float blue) |
Sets three color channels. | |
void | setVec (const float channels[NumChannels]) |
Sets four color channels from an array. | |
void | clamp () |
Clamps negative channel values to zero. | |
ColorHdr | clamped () const |
Returns a clamped version of this color. | |
ColorHdr & | operator= (const Colorf &color) |
Assignment operator from a float color. | |
ColorHdr & | operator+= (const ColorHdr &v) |
ColorHdr & | operator-= (const ColorHdr &v) |
ColorHdr & | operator*= (const ColorHdr &color) |
ColorHdr & | operator*= (float scalar) |
Multiplication by a constant scalar. | |
ColorHdr | operator+ (const ColorHdr &color) const |
ColorHdr | operator- (const ColorHdr &color) const |
ColorHdr | operator* (const ColorHdr &color) const |
ColorHdr | operator* (float scalar) const |
Multiplication by a constant scalar. | |
Static Public Attributes | |
static const int | NumChannels = 3 |
static const ColorHdr | Black |
static const ColorHdr | White |
static const ColorHdr | Red |
static const ColorHdr | Green |
static const ColorHdr | Blue |
A three channels unclamped float color.