Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RVColor Class Reference

re-volt basic type for colors. More...

#include <rvcolor.h>

List of all members.

Public Methods

void setRed (rvulong val)
void setGreen (rvulong val)
void setBlue (rvulong val)
void setAlpha (rvulong val)
rvulong red (void)
rvulong green (void)
rvulong blue (void)
rvulong alpha (void)
void shadeAdd (int r, int g, int b)
rvulong channel (int ch)
void setChannel (int ch, rvulong val)
void setRGB (rvulong r, rvulong g, rvulong b)
void setRGBf (rvfloat r, rvfloat g, rvfloat b)
rvfloat brightness (void)
void shade (float sr, float sg, float sb)
void shade (float s)

Public Attributes

rvulong value


Detailed Description

re-volt basic type for colors.

frontend to the 32-bit field used for color definitions.


Member Function Documentation

rvulong RVColor::alpha ( void ) [inline]
 

returns Alpha channel value

rvulong RVColor::blue ( void ) [inline]
 

returns Blue channel value

rvfloat RVColor::brightness ( void )
 

Returns:
the brightness. Always between 0.0 and 1.0

rvulong RVColor::channel ( int ch )
 

return the value for the channel ch, where

  • 0 is Alpha
  • 1 is Red
  • 2 is Green
  • 3 is Blue

rvulong RVColor::green ( void ) [inline]
 

returns Green channel value

rvulong RVColor::red ( void ) [inline]
 

returns Red channel value

void RVColor::setAlpha ( rvulong val ) [inline]
 

sets Alpha channel value to val

void RVColor::setBlue ( rvulong val ) [inline]
 

sets Blue channel value to val

void RVColor::setChannel ( int ch,
rvulong val )
 

sets the value for the channel ch to val, where

  • 0 is Alpha
  • 1 is Red
  • 2 is Green
  • 3 is Blue

void RVColor::setGreen ( rvulong val ) [inline]
 

sets Green channel value to val

void RVColor::setRGB ( rvulong r,
rvulong g,
rvulong b )
 

sets the R, G and B channels, leaving the Alpha channel untouched

void RVColor::setRGBf ( rvfloat r,
rvfloat g,
rvfloat b ) [inline]
 

sets the R, G and B channels, leaving the Alpha channel untouched

void RVColor::setRed ( rvulong val ) [inline]
 

sets Red channel value to val

void RVColor::shade ( float s ) [inline]
 

void RVColor::shade ( float sr,
float sg,
float sb )
 

brightens or darkens the color by multiplying with the given factors

void RVColor::shadeAdd ( int r,
int g,
int b )
 

shades by adding or substracting values


Member Data Documentation

rvulong RVColor::value
 

value as found in re-volt files


The documentation for this class was generated from the following files:
Generated at Fri Jul 26 09:34:00 2002 for rvtmod/rvglue by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000