NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

Colour Class Reference
[Image creation]

#include <tga_image.h>

List of all members.

Public Member Functions

 Colour ()
 Colour (float R, float G, float B)
const Colouroperator*= (float fact)
const Colour operator+ (const Colour &c2) const
const Colour operator* (double f) const

Public Attributes

float r
float g
float b


Detailed Description

A very simple class for storing RGB colours.

Definition at line 46 of file tga_image.h.


Constructor & Destructor Documentation

Colour::Colour (  )  [inline]

Default constructor. Does not initialize r, g and b.

Definition at line 54 of file tga_image.h.

Colour::Colour ( float  R,
float  G,
float  B 
) [inline]

Initializes the colour with R, G and B.

Definition at line 56 of file tga_image.h.


Member Function Documentation

const Colour& Colour::operator*= ( float  fact  )  [inline]

Multiplies all components with fact.

Definition at line 58 of file tga_image.h.

const Colour Colour::operator+ ( const Colour c2  )  const [inline]

Returns the sum colour of *this and c2.

Definition at line 61 of file tga_image.h.

const Colour Colour::operator* ( double  f  )  const [inline]

Returns *this, scaled by f.

Definition at line 64 of file tga_image.h.


Member Data Documentation

float Colour::r

the red component

Definition at line 49 of file tga_image.h.

float Colour::g

the green component

Definition at line 49 of file tga_image.h.

float Colour::b

the blue component

Definition at line 49 of file tga_image.h.


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

Generated on Fri Jun 18 16:12:29 2010 for LevelS C++ support library
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650