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

Background Class Reference

#include <Background.h>

List of all members.

Public Member Functions

 Background (CGrid *resampledGrid, unsigned int resamplingFactor, float minValue, float maxValue)
 ~Background ()
void updateTexture (int dataSet=0) throw (Error)
void render ()
void setPeekFunction (bool state)

Public Attributes

float peekValue
sRGBApeekColor

Private Member Functions

void getLinearInterpolatedColor (float value, float &red, float &green, float &blue, float &alpha)

Private Attributes

float * colorArray
float minValue
float maxValue
float valueRange
sRGBAminColor
sRGBAmaxColor
sRGBAmaxColor2
CGridgrid
unsigned int texName
unsigned int resamplingFactor


Constructor & Destructor Documentation

Background::Background CGrid resampledGrid,
unsigned int  resamplingFactor,
float  minValue,
float  maxValue
 

The constructor of the background takes a resampled grid and a resampling factor which is used to scale the generated texture again.

Background::~Background  )  [inline]
 

Free the allocated memory. (maybe here should be also a gUnbind texture?)


Member Function Documentation

void Background::getLinearInterpolatedColor float  value,
float &  red,
float &  green,
float &  blue,
float &  alpha
[private]
 

Function wich returns the color value for a given value. The returned r,g,b,a components are assigned to values in the colorArray and are interplated betwenn minColor - [peekColor] - maxColor

void Background::render  ) 
 

Render the background texture (OpenGL stuff)

void Background::setPeekFunction bool  state  ) 
 

Set the tx-function to peek if the state is true. In this case, min and max color are the same and the colors gets interpolated between the peek color, wich is assigned to the peekValue

Parameters:
state [true, false] where true means that the txfunction is is a peek function.

void Background::updateTexture int  dataSet = 0  )  throw (Error)
 

Generate a texture for the given dataset value.

Parameters:
dataSet = [0,1] where 0 = pressure and 1 = vorticity.


Member Data Documentation

float* Background::colorArray [private]
 

The array which holds the RGBA values of the texture

CGrid* Background::grid [private]
 

The resampled grid which is used to draw the colors

sRGBA* Background::maxColor [private]
 

Color wich is assigned to the maximum value in linear interpolation mode

sRGBA* Background::maxColor2 [private]
 

Color wich is assigned to the maximum value in peek interpolation mode

float Background::maxValue [private]
 

The given max value for the dataset

sRGBA* Background::minColor [private]
 

Color which is assigned to the minimum value

float Background::minValue [private]
 

The given min value of the dataset

sRGBA* Background::peekColor
 

Color wich should be highlighted - TxFunction is ha a peek at this point.

float Background::peekValue
 

Value for which the Tx Funciton should have a peek

unsigned int Background::resamplingFactor [private]
 

The resampling factor for the color grid. This is used to scale the texture again to the original size.

unsigned int Background::texName [private]
 

OpenGl texture name

float Background::valueRange [private]
 

The distance between the min and mx value


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 00:36:47 2006 for ZVis by  doxygen 1.4.1