The Game Engine  1
Color Class Reference

Provides common color related data. More...

#include <Color.h>

+ Collaboration diagram for Color:

Public Member Functions

SDL_Color toSDLColor ()
 Converts to SDL_Color. More...
 
GLfloat getRed ()
 Returns Red insensity as a number between 0 and 1. More...
 
GLfloat getGreen ()
 Returns Green insensity as a number between 0 and 1. More...
 
GLfloat getBlue ()
 Returns Blue insensity as a number between 0 and 1. More...
 
GLfloat getAlpha ()
 Returns Alpha insensity as a number between 0 and 1. More...
 

Public Attributes

Uint8 R
 
Uint8 G
 
Uint8 B
 
Uint8 A
 

Static Public Attributes

static const Color WHITE = {0xFF, 0xFF, 0xFF, 0xFF}
 

Detailed Description

Provides common color related data.

This class is tasked with the following:

  • Providing access to RBGA data in a simple form

Definition at line 16 of file Color.h.

Member Function Documentation

GLfloat Color::getAlpha ( )

Returns Alpha insensity as a number between 0 and 1.

Definition at line 20 of file Color.cpp.

+ Here is the caller graph for this function:

GLfloat Color::getBlue ( )

Returns Blue insensity as a number between 0 and 1.

Definition at line 16 of file Color.cpp.

+ Here is the caller graph for this function:

GLfloat Color::getGreen ( )

Returns Green insensity as a number between 0 and 1.

Definition at line 12 of file Color.cpp.

+ Here is the caller graph for this function:

GLfloat Color::getRed ( )

Returns Red insensity as a number between 0 and 1.

Definition at line 8 of file Color.cpp.

+ Here is the caller graph for this function:

SDL_Color Color::toSDLColor ( )

Converts to SDL_Color.

Definition at line 3 of file Color.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

Uint8 Color::A

Definition at line 22 of file Color.h.

Uint8 Color::B

Definition at line 21 of file Color.h.

Uint8 Color::G

Definition at line 20 of file Color.h.

Uint8 Color::R

Definition at line 19 of file Color.h.

const Color Color::WHITE = {0xFF, 0xFF, 0xFF, 0xFF}
static

Definition at line 24 of file Color.h.


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