#include <TxFunction.h>
Public Member Functions | |
TxFunction (float x1, float y1, float x2, float y2) | |
~TxFunction () | |
void | addControlPoint (GLfloat x, GLfloat y, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) |
void | removeControlPoint (TxPoint *p) |
void | moveControlPoint (TxPoint *point, GLfloat x, GLfloat y) |
TxPoint * | hitTxPoint (GLfloat x, GLfloat y) |
TxPoint * | getLastTxPoint () |
TxPoint * | getFirstTxPoint () |
void | render () |
TxPoint * | getNearestNeighbour (unsigned short density) |
void | getLinearInterpolatedColor (unsigned short density, float &red, float &green, float &blue, float &alpha) |
void | getLinearInterpolatedVoxelColor (float density, float &red, float &green, float &blue) |
void | getLevoyVoxelColor (float density, float &red, float &green, float &blue, float gradient) |
void | getSolidVoxelColor (float denisty, float &red, float &green, float &blue) |
Private Attributes | |
vector< TxPoint > | controlPoints |
|
The contructor the tranferfunction creates a function with 2 controlpoints - at the beginning and at the end. The controlpoints are usually given by the histogram dimensions.
|
|
|
|
Add a controlPoint to the vector wich holds the TxPoints. The function should only be called after the check.
|
|
Retrieve the first point |
|
Retrieve the last point |
|
|
|
Find the linear interpolated color of a given density. The method searches for the controlpoint that is next to the given density using the
|
|
|
|
Find the next greater neighbour for a given density. This will also determine the |
|
|
|
Check if the point is already in the function. This function is called each time before the user adds a point
|
|
Update the coordinates of a given controlpoint.
|
|
Remove the given controlPoint from the list, if it is not the end or starting point of the transfer function.
|
|
This function draws the shape of the transfer function. |
|
|