ColorMapping Class Reference

#include <ColorMapping.h>

List of all members.

Public Member Functions

 ColorMapping ()
 ColorMapping (Color c1, Color c2)
 ~ColorMapping ()
bool addColor (double x)
bool removeColor (int i)
void moveColor (int i, double x)
void setColor (int i, int r, int g, int b)
Color getColor (int i)
Color getColorAt (double x)
void resetColorIter ()
bool hasNextColor ()
Color getNextColor ()

Private Member Functions

void init (Color c1, Color c2)

Private Attributes

list< Colorm_Colors
list< Color >::iterator m_colorIter


Constructor & Destructor Documentation

ColorMapping::ColorMapping (  ) 

default constructor. Fills first and last node with default colors.

ColorMapping::ColorMapping ( Color  c1,
Color  c2 
)

Constructor.

Parameters:
c1 color of the first color node
c2 color of the last color node

ColorMapping::~ColorMapping (  ) 

destructor


Member Function Documentation

bool ColorMapping::addColor ( double  x  ) 

Adds a new Color at a place between 0,1. The new color node has default values.

Parameters:
x place of the new color node, between 0,1.
Returns:
true if the operation was successful

bool ColorMapping::removeColor ( int  i  ) 

Removes a color at a certain counter.

Parameters:
i count of the color node to remove.
Returns:
true if the operation was successful

void ColorMapping::moveColor ( int  i,
double  x 
)

Moves a certain color to another place.

Parameters:
i count of the color node to be moved
x new place of the color node

void ColorMapping::setColor ( int  i,
int  r,
int  g,
int  b 
)

Sets the color of a node of a certain count.

Parameters:
i count of the color node to be altered
r new red value
g new green value
b new blue balue

Color ColorMapping::getColor ( int  i  ) 

Returns the color of a the color node at a certain count.

Parameters:
i count of the color node
Returns:
the desired color

Color ColorMapping::getColorAt ( double  x  ) 

Returns the interpolated color at a place between 0,1 in dependence of the other color nodes.

Parameters:
x value of the color map, between 0,1
Returns:
the desired color

void ColorMapping::resetColorIter (  ) 

Resets the color iterator.

bool ColorMapping::hasNextColor (  ) 

Returns if there are any colors left relative to the iterator.

Returns:
true if there is any color left

Color ColorMapping::getNextColor (  ) 

Returns the color of the iterator and increases the iterator.

Returns:
the next color of the iterator

void ColorMapping::init ( Color  c1,
Color  c2 
) [private]

This method is called by the constructors to initialize the color map.


Member Data Documentation

list<Color> ColorMapping::m_Colors [private]

list<Color>::iterator ColorMapping::m_colorIter [private]

list of all color nodes


The documentation for this class was generated from the following file:
Generated on Wed Jan 17 03:48:39 2007 for Flowvis-parma_wallaby by  doxygen 1.5.1-p1