Main Page | Class Hierarchy | Class List | File List | Class Members

ColourA Class Reference

#include <colour.h>

List of all members.

Public Member Functions

 ColourA (CLR r, CLR g, CLR b, CLR a)
 ColourA (const CLR &a)
 ColourA (const Colour &d)
CLR red () const
CLR green () const
CLR blue () const
CLR alpha () const
void add (const ColourA &d)
void sub (const ColourA &d)
void scale (CLR s)
void scale (const ColourA &d)
void scale (const Colour &d)
ColourA scaled (CLR s) const
CLR norm () const


Detailed Description

Colour vector including an alpha (transparency) component.
Author:
Micha Riser


Constructor & Destructor Documentation

ColourA::ColourA CLR  r,
CLR  g,
CLR  b,
CLR  a
[inline]
 

Constructs new colour form red, green, blue and alpha components.

ColourA::ColourA const CLR &  a  )  [inline]
 

Copy constructor.

ColourA::ColourA const Colour d  ) 
 

Construct ColourA from Colour. Alpha component is set to 0.


Member Function Documentation

void ColourA::add const ColourA d  )  [inline]
 

Add ColourA. (What to do with alpha?)

Parameters:
d colour to add

CLR ColourA::norm  )  const [inline]
 

Colour norm.

Returns:
a (unspecified) norm of the colour

void ColourA::scale const Colour d  ) 
 

Scale rgb components componentwise. Alpha is not changed.

Parameters:
d ColourA holding the scaling coifficients

void ColourA::scale const ColourA d  )  [inline]
 

Scale colour componentwise. (What to do with alpha?)

Parameters:
d ColourA holding the scaling coifficients

void ColourA::scale CLR  s  )  [inline]
 

Scale colour by float.

Parameters:
s scaling coifficient

ColourA ColourA::scaled CLR  s  )  const [inline]
 

Returns:
colour scaled by factor
Parameters:
s scaling factor

void ColourA::sub const ColourA d  )  [inline]
 

Subtract ColourA. (What to do with alpha?)

Parameters:
d colour to subtract


The documentation for this class was generated from the following files:
Generated on Thu Jan 27 12:16:06 2005 for raytracer.kdevelop by doxygen 1.3.8