#include <glfxvec.h>
Public Member Functions | |
Color (const Vec3 &v) | |
Color (const Vec4 &v) | |
Color (float r, float g, float b, float a=1.0f) | |
Color (int r, int g, int b, int a=255) | |
Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) | |
Color (const Color &c) | |
Color (unsigned long c) | |
Color (long c) | |
Color (unsigned int c) | |
Color (int c) | |
Color (float c) | |
operator Vec3 () const | |
operator Vec4 () const | |
operator unsigned char * () const | |
Color & | operator *= (Color c) |
unsigned long | ARGB () const |
unsigned long & | ARGB () |
float | Redf () const |
float | Greenf () const |
float | Bluef () const |
float | Alphaf () const |
Public Attributes | |
unsigned char | blue |
unsigned char | green |
unsigned char | red |
unsigned char | alpha |
Friends | |
Color | operator * (Color a, Color b) |
GLFX::Color::Color | ( | const Vec3 & | v | ) | [inline] |
Construct from 4d vector.
GLFX::Color::Color | ( | const Vec4 & | v | ) | [inline] |
Construct from 4d vector.
GLFX::Color::Color | ( | float | r, | |
float | g, | |||
float | b, | |||
float | a = 1.0f | |||
) | [inline] |
Construct from rgba values.
GLFX::Color::Color | ( | int | r, | |
int | g, | |||
int | b, | |||
int | a = 255 | |||
) | [inline] |
Construct from rgba values.
GLFX::Color::Color | ( | unsigned char | r, | |
unsigned char | g, | |||
unsigned char | b, | |||
unsigned char | a = 255 | |||
) | [inline] |
Construct from rgba values.
GLFX::Color::Color | ( | const Color & | c | ) | [inline] |
Construct from another color.
GLFX::Color::Color | ( | unsigned long | c | ) | [inline] |
Construct color from single unsigned long value.
GLFX::Color::Color | ( | long | c | ) | [inline] |
Construct color from single long value.
GLFX::Color::Color | ( | unsigned int | c | ) | [inline] |
Construct color from single unsigned int value.
GLFX::Color::Color | ( | int | c | ) | [inline] |
Construct color from single int value.
GLFX::Color::Color | ( | float | c | ) | [inline] |
Construct color from single float value.
GLFX::Color::operator Vec3 | ( | ) | const [inline] |
Convert to 3d vector.
GLFX::Color::operator Vec4 | ( | ) | const [inline] |
Convert to 4d vector.
GLFX::Color::operator unsigned char * | ( | ) | const [inline] |
Convert to unsigned char array.
unsigned long GLFX::Color::ARGB | ( | ) | const [inline] |
Return a single ARGB 32-bit word.
unsigned long & GLFX::Color::ARGB | ( | ) | [inline] |
Return a single ARGB 32-bit word.
float GLFX::Color::Redf | ( | ) | const [inline] |
Convert red value to floating point and transform to [0..1] range.
float GLFX::Color::Greenf | ( | ) | const [inline] |
Convert green value to floating point and transform to [0..1] range.
float GLFX::Color::Bluef | ( | ) | const [inline] |
Convert blue value to floating point and transform to [0..1] range.
float GLFX::Color::Alphaf | ( | ) | const [inline] |
Convert alpha value to floating point and transform to [0..1] range.
unsigned char GLFX::Color::blue |
Blue component.
unsigned char GLFX::Color::green |
Green component.
unsigned char GLFX::Color::red |
Red component.
unsigned char GLFX::Color::alpha |
Alpha component.