TransferFunc Class Reference
#include <TransferFunc.h>
List of all members.
Public Member Functions |
| TransferFunc (const float _x, const float _y, const float _width, const float _height, const int _numberBars, Volume *_volume, ColorChooser *_chooserColor, Shaders *_shader) |
| ~TransferFunc () |
void | setPointList (TfpList *_pointList) |
TfpList * | getListPoints () |
void | render () |
bool | isTFClicked (const float xWorld, const float yWorld) |
void | handleClick (const int button, const int state, const float xWorld, const float yWorld) |
void | updateTFTextureData () |
Protected Member Functions |
void | initHistogram () |
void | drawHistogram () |
void | drawTfpPolynom () |
void | drawTfPoint (TfPoint *prePoint, TfPoint *point) |
void | drawDensityDistribution () |
Detailed Description
The TransferFunction class
Constructor & Destructor Documentation
TransferFunc::TransferFunc |
( |
const float |
_x, |
|
|
const float |
_y, |
|
|
const float |
_width, |
|
|
const float |
_height, |
|
|
const int |
_numberBars, |
|
|
Volume * |
_volume, |
|
|
ColorChooser * |
_chooserColor, |
|
|
Shaders * |
_shader | |
|
) |
| | |
Construct a new Transferfunction object
- Parameters:
-
| _x | X-coordinate of the bottom left corner of the transfer function |
| _y | Y-coordinate of the bottom left corner of the transfer function |
| _width | Width of the transfer function |
| _height | Height of the transfer function |
| _numberBars | Number of bars that are used for drawing the visualisation of the densitiy function |
| _volume | Pointer to the volume |
| _chooserColor | Pointer to the colour chooser |
| _shader | Pointer to the shader |
TransferFunc::~TransferFunc |
( |
|
) |
|
Member Function Documentation
void TransferFunc::drawDensityDistribution |
( |
|
) |
[protected] |
Draw the density distribution
void TransferFunc::drawHistogram |
( |
|
) |
[protected] |
void TransferFunc::drawTfPoint |
( |
TfPoint * |
prePoint, |
|
|
TfPoint * |
point | |
|
) |
| | [protected] |
Draw a TfPoint and the background between the current and the last point, if the current point is not the head of the whole list
- Parameters:
-
| prePoint | The predecessor of the current point |
| point | The current processed point in the transfer point list |
void TransferFunc::drawTfpPolynom |
( |
|
) |
[protected] |
Draw the Transfer Point polygon, that is the transfer point list connected by lines and shaded with the different colors of the points
TfpList * TransferFunc::getListPoints |
( |
|
) |
|
Return a pointer to the transfer point list
- Returns:
- Pointer to the transfer point list
void TransferFunc::handleClick |
( |
const int |
button, |
|
|
const int |
state, |
|
|
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
Handle clicks in the transfer function
- Parameters:
-
| button | Value indicating which button was pressed on the mouse |
| state | Value indicating if button was pressed or released |
| xWorld | X-coordinate of the click relative to the bottom left corner of the viewport |
| yWorld | Y-coordinate of the click relative to the bottom left corner of the viewport |
void TransferFunc::initHistogram |
( |
|
) |
[protected] |
bool TransferFunc::isTFClicked |
( |
const float |
xWorld, |
|
|
const float |
yWorld | |
|
) |
| | |
Return a boolean value indicating whether the current click was into the transferfunction or not
- Parameters:
-
| xWorld | X-coordinate of the click relative to the bottom left corner of the viewport |
| yWorld | Y-coordinate of the click relative to the bottom left corner of the viewport |
- Returns:
- boolean Value indicating whether the current click was into the transfer function or not
void TransferFunc::render |
( |
|
) |
|
Render the transfer function
void TransferFunc::setPointList |
( |
TfpList * |
_pointList |
) |
|
Set the pointer to the transfer point list
- Parameters:
-
| _pointList | The pointer to the transfer point list |
void TransferFunc::updateTFTextureData |
( |
|
) |
|
Update the 1D transfer function texture according to the values currently set in the transfer function
The documentation for this class was generated from the following files:
- D:/C++/Visualisierung/vislab/src/TransferFunc.h
- D:/C++/Visualisierung/vislab/src/TransferFunc.cpp