Public Slots | Signals | Public Member Functions | Protected Member Functions

GLWidget Class Reference

#include <GLWidget.hpp>

List of all members.

Public Slots

void saveScreenshot ()
void channelChanged (int index)
void switchStreamlineState (bool state)
void dtValueChanged (double dt)
void dsepValueChanged (double)
void dtestValueChanged (double)
void interpolationMethodChanged (bool euler)
void paintMethodChanged (bool glyph)
void switchArrowState (bool state)
void numArrowChanged (int glyph)
void alphaArrowChanged (int alpha)
void alphaStreamChanged (int alpha)

Signals

void numChannelsChanged (int channels)

Public Member Functions

 GLWidget (QWidget *parent=0)
virtual ~GLWidget ()
void loadData (const std::string &strFilename)
void setTransferValues (float *_values)
void setArrowColor (float r, float g, float b)
void setStreamColor (float r, float g, float b)

Protected Member Functions

void initializeGL ()
void resizeGL (int width, int height)
void paintGL ()
void renderArrows ()
void renderStreamlines ()
void generateStreamline (vec3 seedingPoint)
vec3 calcEulerPos (vec3 pos)
vec3 calcRungeKuttaPos (vec3 pos)

Detailed Description

Class which represents the OpenGL rendering window. In this Class all needed functions for handling the volume and slice rendering are implemented.

Author:
Christian Hirsch
Clemens Roegner

Constructor & Destructor Documentation

GLWidget::GLWidget ( QWidget *  parent = 0 )

Constructor. This constructor creates a new OpenGL render window.

Parameters:
parentParent QWidget element.
GLWidget::~GLWidget (  ) [virtual]

Destructor. Releases all the needed (graphics) memory.


Member Function Documentation

void GLWidget::alphaArrowChanged ( int  alpha ) [slot]

Changes the alpha value of the arrows.

Parameters:
alphaThe new alpha value.
void GLWidget::alphaStreamChanged ( int  alpha ) [slot]

Changes the alpha value of the arrows.

Parameters:
alphaThe new alpha value.
vec3 GLWidget::calcEulerPos ( vec3  pos ) [protected]

Calculates the next position with the Euler interpolation Method.

Parameters:
posThe current Position.
Returns:
The vector to the next position.
vec3 GLWidget::calcRungeKuttaPos ( vec3  pos ) [protected]

Calculates the next position with the Runge-Kutta interpolation Method.

Parameters:
posThe current Position.
Returns:
The vector to the next position.
void GLWidget::channelChanged ( int  index ) [slot]

Function to change the displayed channel.

Parameters:
indexIndex of the channel.
void GLWidget::dsepValueChanged ( double  _dsep ) [slot]

Changes seperation value for the streamlines.

Parameters:
dtNew dsep value.
void GLWidget::dtestValueChanged ( double  _dtest ) [slot]

Changes test value for the streamlines.

Parameters:
dtNew dtest value.
void GLWidget::dtValueChanged ( double  dt ) [slot]

Changes dt value for the interpolation methods.

Parameters:
dtNew dt value.
void GLWidget::generateStreamline ( vec3  seedingPoint ) [protected]

Generate streamline function. This function creates one streamline.

Parameters:
seedingPointThe point of which a streamline should be created.
void GLWidget::initializeGL (  ) [protected]

Initializes all data needed for rendering (including devil + glut).

void GLWidget::interpolationMethodChanged ( bool  euler ) [slot]

Changes the interpolation method for the streamlines.

Parameters:
eulerIf true, then the Euler method will be used, else the RK method is used.
void GLWidget::loadData ( const std::string &  strFilename )

Loads new flow data.

Parameters:
strFilenameString to the path of the volume data.
void GLWidget::numArrowChanged ( int  glyph ) [slot]

Changes the number of arrows which should be drawn.

Parameters:
numArrowsThe number of arrows in one line and of lines. numArrows * numArrows of arrows will be darwn.
void GLWidget::numChannelsChanged ( int  channels ) [signal]

Signal which is emitted when the number of channels has changed.

Parameters:
channelsThe new number of channels.
void GLWidget::paintGL (  ) [protected]

Render function. Renders either the slices or the full volume data.

void GLWidget::paintMethodChanged ( bool  glyph ) [slot]

Changes the paint method (normal lines vs glyph mapping).

Parameters:
glyphIf true the glyph maps are drawn, else normal lines.
void GLWidget::renderArrows (  ) [protected]

Arrow render function.

void GLWidget::renderStreamlines (  ) [protected]

Streamline render funtcion. This function calculates new streamlines with the alogrithm to generate "Evenly-Spaced Streamlines of Arbitrary Density".

void GLWidget::resizeGL ( int  width,
int  height 
) [protected]

Initializes the OpenGL render window when the window is resized.

Parameters:
widthThe new width of the render window.
heightThe new height of the render window.
void GLWidget::saveScreenshot (  ) [slot]

This function saves a screenhot in the programs folder. The file name is created automatically.

void GLWidget::setArrowColor ( float  r,
float  g,
float  b 
)

Changes the colors of the arrows.

Parameters:
rThe new red value.
gThe new green value.
bThe new blue value.
void GLWidget::setStreamColor ( float  r,
float  g,
float  b 
)

Changes the colors of the streams.

Parameters:
rThe new red value.
gThe new green value.
bThe new blue value.
void GLWidget::setTransferValues ( float *  _values )

Sets new values for the transferfunction.

Parameters:
*_valuesPointer to the first element of a 4096 element float array.
void GLWidget::switchArrowState ( bool  state ) [slot]

Changes the arrow state to [not] draw the arrows.

Parameters:
stateTrue if arrows should be drawn.
void GLWidget::switchStreamlineState ( bool  state ) [slot]

Changes the streamline state to [not] draw the streamlines.

Parameters:
stateTrue if streamlines should be drawn.

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines