#include <Background.h>
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 |
sRGBA * | peekColor |
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 |
sRGBA * | minColor |
sRGBA * | maxColor |
sRGBA * | maxColor2 |
CGrid * | grid |
unsigned int | texName |
unsigned int | resamplingFactor |
|
The constructor of the background takes a resampled grid and a resampling factor which is used to scale the generated texture again. |
|
Free the allocated memory. (maybe here should be also a gUnbind texture?) |
|
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 |
|
Render the background texture (OpenGL stuff) |
|
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
|
|
Generate a texture for the given dataset value.
|
|
The array which holds the RGBA values of the texture |
|
The resampled grid which is used to draw the colors |
|
Color wich is assigned to the maximum value in linear interpolation mode |
|
Color wich is assigned to the maximum value in peek interpolation mode |
|
The given max value for the dataset |
|
Color which is assigned to the minimum value |
|
The given min value of the dataset |
|
Color wich should be highlighted - TxFunction is ha a peek at this point. |
|
Value for which the Tx Funciton should have a peek |
|
The resampling factor for the color grid. This is used to scale the texture again to the original size. |
|
OpenGl texture name |
|
The distance between the min and mx value |