Simulant  21.06-50
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
smlt::Colour Struct Reference

Public Member Functions

 Colour (float r, float g, float b, float a)
 
Colour operator* (const float rhs) const
 
Colour operator*= (const float rhs)
 
Colour operator- (const Colour &rhs) const
 
Colour operator-= (const Colour &rhs)
 
Colour operator+ (const Colour &rhs) const
 
Colour operator+= (const Colour &rhs)
 
bool operator== (const Colour &rhs) const
 
bool operator!= (const Colour &rhs) const
 
bool operator< (const Colour &rhs) const
 
Colour lerp (const Colour &end, float t) const
 
std::string to_hex_string () const
 

Static Public Member Functions

static Colour from_bytes (uint8_t r, uint8_t g, uint8_t b, uint8_t a)
 
static Colour from_hex_string (const std::string &hex_string)
 

Public Attributes

float r
 
float g
 
float b
 
float a
 

Static Public Attributes

static const Colour BLACK = Colour(0.0, 0.0, 0.0, 1.0)
 
static const Colour GREY = Colour(0.5f, 0.5f, 0.5f, 1.0f)
 
static const Colour WHITE = Colour(1.0, 1.0, 1.0, 1.0)
 
static const Colour RED = Colour(1.0, 0.0, 0.0, 1.0)
 
static const Colour GREEN = Colour(0.0, 1.0, 0.0, 1.0)
 
static const Colour BLUE = Colour(0.0, 0.0, 1.0, 1.0)
 
static const Colour YELLOW = Colour(1.0f, 1.0f, 0.0f, 1.0f)
 
static const Colour PURPLE = Colour(1.0f, 0.0f, 1.0f, 1.0f)
 
static const Colour TURQUOISE = Colour(0.0f, 1.0f, 1.0f, 1.0f)
 
static const Colour NONE = Colour(0, 0, 0, 0)
 

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