My Project
|
A linear, 32-bit/component floating point RGBA color. More...
#include <ParaColor.h>
Public Member Functions | |
LinearColor (EnumForceInit) | |
LinearColor (float InR, float InG, float InB, float InA=1.0f) | |
LinearColor (const class Color &C) | |
LinearColor (uint32 C) | |
LinearColor (const float *colors) | |
LinearColor (const class Vector3 &Vector) | |
operator const float * () const | |
float & | Component (int32 Index) |
const float & | Component (int32 Index) const |
LinearColor & | operator= (uint32 color) |
LinearColor & | operator= (const Color &color) |
operator uint32 () const | |
LinearColor | operator+ (const LinearColor &ColorB) const |
LinearColor & | operator+= (const LinearColor &ColorB) |
LinearColor | operator- (const LinearColor &ColorB) const |
LinearColor & | operator-= (const LinearColor &ColorB) |
LinearColor | operator* (const LinearColor &ColorB) const |
LinearColor & | operator*= (const LinearColor &ColorB) |
LinearColor | operator* (float Scalar) const |
LinearColor & | operator*= (float Scalar) |
LinearColor | operator/ (const LinearColor &ColorB) const |
LinearColor & | operator/= (const LinearColor &ColorB) |
LinearColor | operator/ (float Scalar) const |
LinearColor & | operator/= (float Scalar) |
bool | operator== (const LinearColor &ColorB) const |
Comparison operators. | |
bool | operator!= (const LinearColor &Other) const |
bool | Equals (const LinearColor &ColorB, float Tolerance=KINDA_SMALL_NUMBER) const |
LinearColor | CopyWithNewOpacity (float NewOpacicty) |
LinearColor | LinearRGBToHSV () const |
Converts a linear space RGB color to an HSV color. | |
LinearColor | HSVToLinearRGB () const |
Converts an HSV color to a linear space RGB color. | |
Color | Quantize () const |
Quantizes the linear color and returns the result as a color. More... | |
Color | ToColor (bool bSRGB=false) const |
Quantizes the linear color and returns the result as a color with optional sRGB conversion and quality as goal. More... | |
Vector3 | ToVector3 () const |
LinearColor | Desaturate (float Desaturation) const |
Returns a desaturated color, with 0 meaning no desaturation and 1 == full desaturation. More... | |
float | ComputeLuminance () const |
Computes the perceptually weighted luminance value of a color. More... | |
float | GetMax () const |
Returns the maximum value in this color structure. More... | |
bool | IsAlmostBlack () const |
useful to detect if a light contribution needs to be rendered | |
float | GetMin () const |
Returns the minimum value in this color structure. More... | |
float | GetLuminance () const |
Static Public Member Functions | |
static LinearColor | FGetHSV (uint8 H, uint8 S, uint8 V) |
Converts byte hue-saturation-brightness to floating point red-green-blue. | |
static float | Dist (const LinearColor &V1, const LinearColor &V2) |
Euclidean distance between two points. | |
Public Attributes | |
float | r |
float | g |
float | b |
float | a |
Static Public Attributes | |
static float | PowOneOver255Table [256] |
Static lookup table used for color -> LinearColor conversion. More... | |
static const LinearColor | White |
static const LinearColor | Gray |
static const LinearColor | Black |
static const LinearColor | Transparent |
static const LinearColor | Red |
static const LinearColor | Green |
static const LinearColor | Blue |
static const LinearColor | Yellow |
A linear, 32-bit/component floating point RGBA color.
float LinearColor::ComputeLuminance | ( | ) | const |
Computes the perceptually weighted luminance value of a color.
LinearColor LinearColor::Desaturate | ( | float | Desaturation | ) | const |
Returns a desaturated color, with 0 meaning no desaturation and 1 == full desaturation.
Desaturation | Desaturation factor in range [0..1] |
|
inline |
Returns the maximum value in this color structure.
|
inline |
Returns the minimum value in this color structure.
Color LinearColor::Quantize | ( | ) | const |
Quantizes the linear color and returns the result as a color.
This bypasses the SRGB conversion.
Color LinearColor::ToColor | ( | bool | bSRGB = false | ) | const |
Quantizes the linear color and returns the result as a color with optional sRGB conversion and quality as goal.
Quantizes the linear color and returns the result as a Color with optional sRGB conversion and quality as goal.
|
static |
Static lookup table used for color -> LinearColor conversion.
Pow table for fast Color -> LinearColor conversion.
Math::Pow( i / 255.f, 2.2f )