gLaggometer::Colour Class Reference

Collaboration diagram for gLaggometer::Colour:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Colour (REAL r, REAL g, REAL b)
 Colour (ePlayerNetID *player)
void blend (REAL factor, const Colour &target)
void toGl () const

Public Attributes

REAL cp [3]

Static Public Attributes

static const Colour white
static const Colour black


Detailed Description

Definition at line 3803 of file gCycle.cpp.


Constructor & Destructor Documentation

gLaggometer::Colour::Colour ( REAL  r,
REAL  g,
REAL  b 
) [inline]

Definition at line 3806 of file gCycle.cpp.

03807                                    {
03808         cp[0]=r;
03809         cp[1]=g;
03810         cp[2]=b;

gLaggometer::Colour::Colour ( ePlayerNetID player  )  [inline]

Definition at line 3811 of file gCycle.cpp.

03812                                  {
03813         if ( player )
03814         {
03815             player->Color(cp[0], cp[1], cp[2]);
03816         }
03817         else
03818         {
03819             cp[0]=cp[1]=cp[2]=1;
03820         }


Member Function Documentation

void gLaggometer::Colour::blend ( REAL  factor,
const Colour target 
) [inline]

Definition at line 3821 of file gCycle.cpp.

Referenced by gLaggometer::AxesIndicator::AxesIndicator().

03822                                                   {
03823         for (int i=0; i<3; i++) {
03824             cp[i] = (1 - factor) * cp[i] + factor * target.cp[i];
03825         }

Here is the caller graph for this function:

void gLaggometer::Colour::toGl (  )  const [inline]

Definition at line 3826 of file gCycle.cpp.

Referenced by gLaggometer::LagOMeterRenderer::render().

03827 { glColor3f(cp[0], cp[1], cp[2]); }

Here is the caller graph for this function:


Member Data Documentation

REAL gLaggometer::Colour::cp[3]

Definition at line 3805 of file gCycle.cpp.

const Colour gLaggometer::Colour::white [static]

Definition at line 3828 of file gCycle.cpp.

Referenced by gLaggometer::AxesIndicator::AxesIndicator().

const Colour gLaggometer::Colour::black [static]

Definition at line 3829 of file gCycle.cpp.


The documentation for this class was generated from the following file:
Generated on Sun Mar 16 00:05:06 2008 for Armagetron Advanced by  doxygen 1.5.4