TransferFunction Class Reference
#include <TransferFunction.h>
List of all members.
|
Public Member Functions |
| TransferFunction (const float _x, const float _y, const float _width, const float _height, const int _numberOfBars, const float _pointSize, ColorChooser *_colorChooser, Shader *_shader, int _textureID, bool _extraTF, FlowData *_dataset, int _channelNr) |
| ~TransferFunction () |
void | setPointList (TransferPointList *_pointList) |
TransferPointList * | getPointList () |
void | render () |
bool | isTransferFunctionClicked (const float xWorld, const float yWorld) |
void | handleClick (const int button, const int state, const float xWorld, const float yWorld) |
void | updateTransferFunctionTextureData () |
void | uploadTexture () |
| TransferFunction (const float _x, const float _y, const float _width, const float _height, const int _numberOfBars, const float _pointSize, ColorChooser *_colorChooser, Shader *_shader, int _textureID, bool _extraTF, FlowData *_dataset, int _channelNr) |
| ~TransferFunction () |
void | setPointList (TransferPointList *_pointList) |
TransferPointList * | getPointList () |
void | render () |
bool | isTransferFunctionClicked (const float xWorld, const float yWorld) |
void | handleClick (const int button, const int state, const float xWorld, const float yWorld) |
void | updateTransferFunctionTextureData () |
void | uploadTexture () |
Protected Member Functions |
void | initHistogramm () |
void | drawHistogramm () |
void | drawTransferPointPolynom () |
void | drawTransferPoint (TransferPoint *prePoint, TransferPoint *point) |
void | drawDensityDistribution () |
void | initHistogramm () |
void | drawHistogramm () |
void | drawTransferPointPolynom () |
void | drawTransferPoint (TransferPoint *prePoint, TransferPoint *point) |
void | drawDensityDistribution () |
Private Attributes |
float | x |
float | y |
float | width |
float | height |
float | pointSize |
int | numberOfBars |
int * | histogramm |
float * | logHistHeights |
int | maxOfHistogramm |
TransferPointList * | pointList |
ColorChooser * | colorChooser |
bool | pointDragged |
Shader * | shader |
unsigned char * | transferTextureData |
GLuint | transferTexture |
int | textureID |
bool | extraTF |
FlowData * | dataset |
int | channelNr |
Detailed Description
The transfer function class
Constructor & Destructor Documentation
TransferFunction::TransferFunction |
( |
const float |
_x, |
|
|
const float |
_y, |
|
|
const float |
_width, |
|
|
const float |
_height, |
|
|
const int |
_numberOfBars, |
|
|
const float |
_pointSize, |
|
|
ColorChooser * |
_colorChooser, |
|
|
Shader * |
_shader, |
|
|
int |
_textureID, |
|
|
bool |
_extraTF, |
|
|
FlowData * |
_dataset, |
|
|
int |
_channelNr | |
|
) |
| | |
Constructs a new TransferFunction object
- Parameters:
-
| _x | X-Coordinate of the left down corner of the Transfer Function |
| _y | Y-Coordinate of the left down corner of the Transfer Function |
| _width | Width of the Transfer Function |
| _height | Height of the Transfer Function |
| _numberOfBars | Number of bars that are drawn to visualize the density distribution |
| _volume | Pointer to the volume |
| _colorChooser | Pointer to the color chooser |
| _shader | Pointer to the Shader-Object |
TransferFunction::~TransferFunction |
( |
|
) |
|
TransferFunction::TransferFunction |
( |
const float |
_x, |
|
|
const float |
_y, |
|
|
const float |
_width, |
|
|
const float |
_height, |
|
|
const int |
_numberOfBars, |
|
|
const float |
_pointSize, |
|
|
ColorChooser * |
_colorChooser, |
|
|
Shader * |
_shader, |
|
|
int |
_textureID, |
|
|
bool |
_extraTF, |
|
|
FlowData * |
_dataset, |
|
|
int |
_channelNr | |
|
) |
| | |
TransferFunction::~TransferFunction |
( |
|
) |
|
Member Function Documentation
void TransferFunction::drawDensityDistribution |
( |
|
) |
[protected] |
void TransferFunction::drawDensityDistribution |
( |
|
) |
[protected] |
Draws the density distribution
void TransferFunction::drawHistogramm |
( |
|
) |
[protected] |
void TransferFunction::drawHistogramm |
( |
|
) |
[protected] |
Draws a transferPoint and the background between the current and the last point if the current point is not the head of the list
- Parameters:
-
| prePoint | the predecessor of the current point |
| point | the current point in the transfer point list |
void TransferFunction::drawTransferPointPolynom |
( |
|
) |
[protected] |
void TransferFunction::drawTransferPointPolynom |
( |
|
) |
[protected] |
Draws the Transfer Point Polynom, which is the tranfer point list connected by lines and shaded with the colors of the points
Returns a pointer to the transfer-point-list
- Returns:
- Pointer to the transfer-point-list
void TransferFunction::handleClick |
( |
const int |
button, |
|
|
const int |
state, |
|
|
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
void TransferFunction::handleClick |
( |
const int |
button, |
|
|
const int |
state, |
|
|
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
Handles a click into the transfer function
- Parameters:
-
| button | value indicating which button was pressed on the mouse |
| state | value indicating whether the button was pressed or released |
| xWorld | x-Coordinate of the click relative to the left down corner of the viewport |
| yWorld | y-Coordinate of the click relative to the left down corner of the viewport |
void TransferFunction::initHistogramm |
( |
|
) |
[protected] |
void TransferFunction::initHistogramm |
( |
|
) |
[protected] |
Initializes the histogram
bool TransferFunction::isTransferFunctionClicked |
( |
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
bool TransferFunction::isTransferFunctionClicked |
( |
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
Returns a boolean value indicating whether the current click was into the transfer function or not
- Parameters:
-
| _xWorld | x-Coordinate of the click relative to the left down corner of the viewport |
| _yWorld | y-Coordinate of the click relative to the left down corner of the viewport |
- Returns:
- boolean value indicating whether the current click was into the transfer function or not
void TransferFunction::render |
( |
|
) |
|
void TransferFunction::render |
( |
|
) |
|
Renders the Transfer Function
Sets the pointer to the transfer-point-list
- Parameters:
-
| _pointList | the pointer to the transfer-point-list |
void TransferFunction::updateTransferFunctionTextureData |
( |
|
) |
|
void TransferFunction::updateTransferFunctionTextureData |
( |
|
) |
|
Updates the 1D transfer function texture according to the current values in the transfer function
void TransferFunction::uploadTexture |
( |
|
) |
|
void TransferFunction::uploadTexture |
( |
|
) |
|
Uploads the transfer function texture to the shader
Member Data Documentation
Pointer to the color chooser
Determines if the transferfunction should be uploaded as a own transfer function
Height of the Transfer Function
Pointer to the array containing the histogram values
Pointer to the array containing the logarithmized heights of the histogram bars
The maximum of the histogram
Number of bars that are drawn to visualize the density distribution
Boolean value indicating whether a transfer point is dragged at the moment or not
Pointer to the transfer-point-list
Pointer to the Shader-Object
ID of the underlying texture
The 1D Transfer Function Texture
Pointer to an array containing the 1D Transfer Function Texture
Width of the Transfer Function
X-Coordinate of the left down corner of the Transfer Function
Y-Coordinate of the left down corner of the Transfer Function
The documentation for this class was generated from the following files:
- E:/Eigene Dateien/Michi/Studium/Semester7/Vis/LU/Beispiel2/FlowVis/FlowVis_2009_01_19_inkl_Texture/header/TransferFunction.h
- E:/Eigene Dateien/Michi/Studium/Semester7/Vis/LU/Beispiel2/FlowVis/header/TransferFunction.h
- E:/Eigene Dateien/Michi/Studium/Semester7/Vis/LU/Beispiel2/FlowVis/FlowVis_2009_01_19_inkl_Texture/src/TransferFunction.cpp
- E:/Eigene Dateien/Michi/Studium/Semester7/Vis/LU/Beispiel2/FlowVis/src/TransferFunction.cpp