#include <xsi_color4f.h>
A color class represented by single floating values. CColor4f supports the RGBA, HSVA and HLSA color models.
Public Types |
|
enum | Type |
Public Member Functions |
|
SICPPSDK_INLINE | CColor4f () |
SICPPSDK_INLINE | CColor4f (float in_R, float in_G, float in_B, float in_A) |
SICPPSDK_INLINE | CColor4f (float in_Arg1, float in_Arg2, float in_Arg3, float in_A, Type in_eColorType) |
SICPPSDK_INLINE | CColor4f (const CColor4f &in_color) |
~CColor4f () | |
SICPPSDK_INLINE void | Set (float in_R, float in_G, float in_B, float in_A) |
SICPPSDK_INLINE void | Set (float in_Arg1, float in_Arg2, float in_Arg3, float in_A, Type in_eColorType) |
SICPPSDK_INLINE float & | PutR (const float in_R) |
SICPPSDK_INLINE float & | PutG (const float in_G) |
SICPPSDK_INLINE float & | PutB (const float in_B) |
SICPPSDK_INLINE float & | PutA (const float in_A) |
SICPPSDK_INLINE void | GetAsRGBA (float &out_R, float &out_G, float &out_B, float &out_A) const |
SICPPSDK_INLINE void | GetAsHLSA (float &out_H, float &out_L, float &out_S, float &out_A) const |
SICPPSDK_INLINE void | GetAsHSVA (float &out_H, float &out_S, float &out_V, float &out_A) const |
SICPPSDK_INLINE float | GetH () const |
SICPPSDK_INLINE float | GetL () const |
SICPPSDK_INLINE float | GetS_HSVA () const |
SICPPSDK_INLINE float | GetS_HLSA () const |
SICPPSDK_INLINE float | GetV () const |
SICPPSDK_INLINE float & | GetR () |
SICPPSDK_INLINE float & | GetG () |
SICPPSDK_INLINE float & | GetB () |
SICPPSDK_INLINE float & | GetA () |
SICPPSDK_INLINE float * | GetRGBA () |
SICPPSDK_INLINE const float & | GetR () const |
SICPPSDK_INLINE const float & | GetG () const |
SICPPSDK_INLINE const float & | GetB () const |
SICPPSDK_INLINE const float & | GetA () const |
SICPPSDK_INLINE const float * | GetRGBA () const |
SICPPSDK_INLINE | operator float * () |
SICPPSDK_INLINE bool | operator== (const CColor4f &in_rColor4f) const |
SICPPSDK_INLINE bool | operator!= (const CColor4f &in_rColor4f) const |
SICPPSDK_INLINE bool | operator< (const CColor4f &in_rColor4f) const |
SICPPSDK_INLINE bool | IsNull (float in_fEpsilon) const |
SICPPSDK_INLINE CColor4f & | Add (const CColor4f &in_col) |
SICPPSDK_INLINE CColor4f & | Mul (float in_fFactor) |
SICPPSDK_INLINE CColor4f & | Mul (const CColor4f &in_col) |
SICPPSDK_INLINE CColor4f & | Sub (const CColor4f &in_col) |
SICPPSDK_INLINE CColor4f & | Negate () |
SICPPSDK_INLINE void | PutNull () |
SICPPSDK_INLINE float | GetBrightness () const |
SICPPSDK_INLINE float | GetBrightnessWithAlpha () const |
SICPPSDK_INLINE float | GetGrayscale () const |
SICPPSDK_INLINE float | GetGrayscaleWithAlpha () const |
SICPPSDK_INLINE CColor4f & | InverseRGB () |
enum Type |
Defines the color model types supported.
SICPPSDK_INLINE CColor4f | ( | ) |
Default constructor.
SICPPSDK_INLINE CColor4f | ( | float | in_R, |
float | in_G, | ||
float | in_B, | ||
float | in_A | ||
) |
Constructor.
in_R | Red component |
in_G | Green component |
in_B | Blue component |
in_A | Alpha component |
SICPPSDK_INLINE CColor4f | ( | float | in_Arg1, |
float | in_Arg2, | ||
float | in_Arg3, | ||
float | in_A, | ||
Type | in_eColorType | ||
) |
Constructor. Creates a new object of a specific color type .
in_Arg1 | Component 1 |
in_Arg2 | Component 2 |
in_Arg3 | Component 3 |
in_A | Alpha component |
in_eColorType | Color type |
Copy constructor. Cretaes a new object as a RGBA type.
in_color | CColor4f object. |
~CColor4f | ( | ) | [inline] |
Destructor.
SICPPSDK_INLINE void Set | ( | float | in_R, |
float | in_G, | ||
float | in_B, | ||
float | in_A | ||
) |
Set the object with new values.
in_R | Red component |
in_G | Green component |
in_B | Blue component |
in_A | Alpha component |
SICPPSDK_INLINE void Set | ( | float | in_Arg1, |
float | in_Arg2, | ||
float | in_Arg3, | ||
float | in_A, | ||
Type | in_eColorType | ||
) |
Set the object with new values for a specific type.
in_Arg1 | Component 1 |
in_Arg2 | Component 2 |
in_Arg3 | Component 3 |
in_A | Alpha component |
in_eColorType | Color type |
SICPPSDK_INLINE float & PutR | ( | const float | in_R | ) |
Set the object's red component.
in_R | value |
SICPPSDK_INLINE float & PutG | ( | const float | in_G | ) |
Set the object's green component.
in_G | value |
SICPPSDK_INLINE float & PutB | ( | const float | in_B | ) |
Set the object's blue component.
in_B | value |
SICPPSDK_INLINE float & PutA | ( | const float | in_A | ) |
Set the object's alpha component.
in_A | value |
SICPPSDK_INLINE void GetAsRGBA | ( | float & | out_R, |
float & | out_G, | ||
float & | out_B, | ||
float & | out_A | ||
) | const |
Returns the object's RGBA values.
out_R | Red component |
out_G | Green component |
out_B | Blue component |
out_A | Alpha component |
SICPPSDK_INLINE void GetAsHLSA | ( | float & | out_H, |
float & | out_L, | ||
float & | out_S, | ||
float & | out_A | ||
) | const |
Returns the object's HLSA values.
out_H | Hue component |
out_L | Luminance component |
out_S | Saturation component |
out_A | Alpha component |
SICPPSDK_INLINE void GetAsHSVA | ( | float & | out_H, |
float & | out_S, | ||
float & | out_V, | ||
float & | out_A | ||
) | const |
Returns the object's HSVA values.
out_H | Hue component |
out_S | Saturation component |
out_V | Value component |
out_A | Alpha component |
SICPPSDK_INLINE float GetH | ( | ) | const |
SICPPSDK_INLINE float GetL | ( | ) | const |
SICPPSDK_INLINE float GetS_HSVA | ( | ) | const |
Return the object's saturation component from the HSVA color space.
SICPPSDK_INLINE float GetS_HLSA | ( | ) | const |
Return the object's saturation component from the HLSA color space.
SICPPSDK_INLINE float GetV | ( | ) | const |
SICPPSDK_INLINE float & GetR | ( | ) |
SICPPSDK_INLINE float & GetG | ( | ) |
SICPPSDK_INLINE float & GetB | ( | ) |
SICPPSDK_INLINE float & GetA | ( | ) |
SICPPSDK_INLINE float * GetRGBA | ( | ) |
SICPPSDK_INLINE const float & GetR | ( | ) | const |
Return a reference on the object's red component.
SICPPSDK_INLINE const float & GetG | ( | ) | const |
Return a reference on the object's green component.
SICPPSDK_INLINE const float & GetB | ( | ) | const |
Return a reference on the object's blue component.
SICPPSDK_INLINE const float & GetA | ( | ) | const |
Return a reference on the object's alpha component.
SICPPSDK_INLINE const float * GetRGBA | ( | ) | const |
Return a read-only pointer the color component array.
SICPPSDK_INLINE operator float * | ( | ) |
float cast operator which returns a pointer to the color component array.
SICPPSDK_INLINE bool operator== | ( | const CColor4f & | in_rColor4f | ) | const |
Performs exact comparison of two colors.
in_rColor4f | Color to compare against |
SICPPSDK_INLINE bool operator!= | ( | const CColor4f & | in_rColor4f | ) | const |
Inequality operator tests the strict inequality of this color with in_rColor4f.
in_rColor4f | Color to test against. |
SICPPSDK_INLINE bool operator< | ( | const CColor4f & | in_rColor4f | ) | const |
Less than operator. Performs a comparison with a specified CColor4f to determine if this CColor4f is less than the specified CColor4f. The comparison is arbitrary and not geometrically meaningful, it's only purpose is to make CColor4f compliant with stl for sorting operations.
in_rColor4f | CColor4f to compare. |
SICPPSDK_INLINE bool IsNull | ( | float | in_fEpsilon | ) | const |
Returns true if all component are less than a specific tolerance value.
in_fEpsilon | Tolerance to test against |
Adds input color values to this object.
in_col | Color to add. |
SICPPSDK_INLINE CColor4f & Mul | ( | float | in_fFactor | ) |
Scales this color with a factor value.
in_fFactor | Multiply factor. |
Multiplies this color with an input color (this.R *= c.R, this.G *= c.G, etc...)
in_col | Color operand. |
Subtracts the input color from this one.
in_col | Multiply factor. |
SICPPSDK_INLINE CColor4f & Negate | ( | ) |
SICPPSDK_INLINE void PutNull | ( | ) |
SICPPSDK_INLINE float GetBrightness | ( | ) | const |
SICPPSDK_INLINE float GetBrightnessWithAlpha | ( | ) | const |
Returns the brightness value multiplied with the alpha component.
SICPPSDK_INLINE float GetGrayscale | ( | ) | const |
SICPPSDK_INLINE float GetGrayscaleWithAlpha | ( | ) | const |
Returns the grayscale value multiplied with the alpha component.
SICPPSDK_INLINE CColor4f & InverseRGB | ( | ) |
Inverts the component values for this color.