DubiousEngine  0.2.0
Simple Game Engine
Dubious::Renderer::Color Class Reference

Simple color class. More...

#include <Color.h>

Public Member Functions

 Color ()=default
 default constructor. Makes black More...
 
 Color (float r, float g, float b)
 Creates a color of the specified RGB with alpha=1. More...
 
 Color (float r, float g, float b, float a)
 Creates a color of the specified RGBA. More...
 
float red () const
 Access - read only access to red. More...
 
float green () const
 Access - read only access to green. More...
 
float blue () const
 Access - read only access to blue. More...
 
float alpha () const
 Access - read only access to alpha. More...
 

Static Public Attributes

static const Color RED
 
static const Color GREEN
 
static const Color BLUE
 
static const Color BLACK
 
static const Color WHITE
 

Detailed Description

Simple color class.

Stores RGBA. Also contains a few predefined colors.

Constructor & Destructor Documentation

Dubious::Renderer::Color::Color ( )
default

default constructor. Makes black

Dubious::Renderer::Color::Color ( float  r,
float  g,
float  b 
)

Creates a color of the specified RGB with alpha=1.

Parameters
r- [in] Red
g- [in] Green
b- [in] Blue
Dubious::Renderer::Color::Color ( float  r,
float  g,
float  b,
float  a 
)

Creates a color of the specified RGBA.

Parameters
r- [in] Red
g- [in] Green
b- [in] Blue
a- [in] Alpha

Member Function Documentation

float Dubious::Renderer::Color::alpha ( ) const
inline

Access - read only access to alpha.

Returns
alpha
float Dubious::Renderer::Color::blue ( ) const
inline

Access - read only access to blue.

Returns
blue
float Dubious::Renderer::Color::green ( ) const
inline

Access - read only access to green.

Returns
green
float Dubious::Renderer::Color::red ( ) const
inline

Access - read only access to red.

Returns
red

Member Data Documentation

const Color Dubious::Renderer::Color::BLACK
static
const Color Dubious::Renderer::Color::BLUE
static
const Color Dubious::Renderer::Color::GREEN
static
const Color Dubious::Renderer::Color::RED
static
const Color Dubious::Renderer::Color::WHITE
static

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