Colobot
Public Member Functions | Public Attributes | List of all members
Gfx::Color Struct Reference

RGBA color. More...

#include <color.h>

Public Member Functions

 Color (float aR=0.0f, float aG=0.0f, float aB=0.0f, float aA=0.0f)
 Constructor; default values are (0,0,0,0) = black. More...
 
Color Inverse () const
 
float * Array ()
 Returns the struct cast to float* array; use with care! More...
 
const float * Array () const
 Returns the struct cast to const float* array; use with care! More...
 
std::string ToString () const
 Returns a string (r, g, b, a) More...
 
bool operator== (const Color &other) const
 
bool operator!= (const Color &other) const
 
Color operator* (float scale) const
 

Public Attributes

float r
 Red, green, blue and alpha components. More...
 
float g
 
float b
 
float a
 

Detailed Description

RGBA color.

Constructor & Destructor Documentation

Gfx::Color::Color ( float  aR = 0.0f,
float  aG = 0.0f,
float  aB = 0.0f,
float  aA = 0.0f 
)
inlineexplicit

Constructor; default values are (0,0,0,0) = black.

Member Function Documentation

float* Gfx::Color::Array ( )
inline

Returns the struct cast to float* array; use with care!

const float* Gfx::Color::Array ( ) const
inline

Returns the struct cast to const float* array; use with care!

std::string Gfx::Color::ToString ( ) const
inline

Returns a string (r, g, b, a)

Member Data Documentation

float Gfx::Color::r

Red, green, blue and alpha components.


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