Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuColourN Class Reference

vuColourN is a virtual base class for all colours. More...

#include <vuColour.h>

Inheritance diagram for vuColourN:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 vuColourN (void)
 default constructor
virtual ~vuColourN (void)
 destructor
virtual floatoperator[] (unsigned int index)
 provides direct random access to the components
virtual float operator[] (unsigned int index) const
 provides direct reading access to the components
virtual floatgetData ()
 returns a pointer to the float array containing the data
virtual float const * getData () const
 returns a pointer to the float array containing the data
virtual word nComponents () const
 returns the number of components.
virtual void print () const
 prints the components of the colour

Detailed Description

vuColourN is a virtual base class for all colours.

It allows basic access to the data independent from the underlying colour model. The user has to be careful not to read beyond the last element given be nComponents(). All vuColour<S> templates are derived from this base class and all colour models are derived from a specific vuColour<S>. For instance vuColourRGBa is derived from vuColour<4>. It is not possible to access binary operators from this base class. These operations have to be performed in the specific model.

Definition at line 30 of file vuColour.h.


Constructor & Destructor Documentation

vuColourN::vuColourN void   )  [inline]
 

default constructor

Definition at line 34 of file vuColour.h.

virtual vuColourN::~vuColourN void   )  [inline, virtual]
 

destructor

Definition at line 37 of file vuColour.h.


Member Function Documentation

virtual float const* vuColourN::getData  )  const [inline, virtual]
 

returns a pointer to the float array containing the data

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 49 of file vuColour.h.

virtual float* vuColourN::getData  )  [inline, virtual]
 

returns a pointer to the float array containing the data

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 46 of file vuColour.h.

Referenced by SMatrix::SMatrix().

virtual word vuColourN::nComponents  )  const [inline, virtual]
 

returns the number of components.

This depends on the number given during creation of the template.

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 53 of file vuColour.h.

References word.

Referenced by vuTFDesign::ColourNode::ColourNode(), vuTFPreintegrated::integrate(), vuTFDesignSpec::LightNode::LightNode(), and SMatrix::SMatrix().

virtual float vuColourN::operator[] unsigned int  index  )  const [inline, virtual]
 

provides direct reading access to the components

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 43 of file vuColour.h.

virtual float& vuColourN::operator[] unsigned int  index  )  [inline, virtual]
 

provides direct random access to the components

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 40 of file vuColour.h.

virtual void vuColourN::print  )  const [inline, virtual]
 

prints the components of the colour

Reimplemented in vuColour< S >, vuColour< 32 >, vuColour< 10 >, vuColour< 4 >, and vuColour< 8 >.

Definition at line 56 of file vuColour.h.


The documentation for this class was generated from the following file:
Generated on Wed Dec 15 21:21:13 2004 for vuVolume by  doxygen 1.3.9.1