FlowWidget Class Reference

OpenGL Widget which renders Glyphs or Streamlines (evenly spaced) of a 2D Flow Dataset. (depending on the render mode). More...

#include <FlowWidget.h>

List of all members.

Public Slots

void IdleFunc ()
 Called whenever nothing else has to be done. Responsible for updating and rendering.
void takeScreenshot ()
 Stores a Screenshot of the current Frame of the rendering widget in a file.
void setGlyphSpacing (int val)
 Sets the spacing between the Glyphs.
void setGlyphSize (int val)
 Sets the size of the Glyphs.
void setGlyphAlpha (int val)
 Sets the transparency of the Glyphs.
void setCurrentChannelTexture (int val)
 Sets the texture handle of the texture which will then be the active Channel Texture.
void setGlyphActive (int val)
 Activates or deactivates Glyph Rendering.
void setDataChannelActive (int val)
 Activates or deactivates Data Channel Rendering.
void setGlyphColorCoding (int val)
 Activates or deactivates color coding of the Glyphs.
void setGlyphScaling (int val)
 Activates or deactivates Glyph Scaling.
void setEulerRendering ()
 Activates Euler Integration mode in the streamlines calculation.
void setRK2Rendering ()
 Activates Runge-Kutta Integration mode in the streamlines calculation.
void setEulerRK2Rendering ()
 Activates Euler and Runge-Kutta Integration mode in the streamlines calculation.
void clearStreamlines ()
 Clears all calculated streamlines.
void setEulerStepSize (double val)
 Sets the step size for Euler Integration Mode.
void setRK2StepSize (double val)
 Sets the step size for Runge-Kutta Integration Mode.
void setDSep (int val)
 Sets the minimal distance for planting new streamline seed points.
void setDTest (int val)
 Sets the percentage of DSep as minimal distance until a streamline calculation will be stopped.
void setStepSize (int val)
 Sets the step size for the evenly spaced streamlines calculation.
void calculateStreamlines ()
 Initiates the calculation of evenly spaced streamlines.

Public Member Functions

 FlowWidget (QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0)
 Constructor of FlowWidget Class.
QSize minimumSizeHint () const
 Returns the minimum Size of the Widget.
QSize sizeHint () const
 Returns the Size of the Widget.
void setFlow (FlowData *flow)
 Sets the Flow Dataset which will be rendered.
void loadTextures ()
 Loads the Flow Dataset in multiple Textures on the graphic hardware. The first Texture contain the triple (X,Y,Length) of the Vector Data as RGB Values. Additionally for all other Channels of the Flow Dataset an intensity texture is generated for each Channel.
unsigned int getTexture ()
 Returns the Texture Handle of the Flow Vector Data Texture.
unsigned int * getTextureP ()
 Returns a Pointer to the Texture Handle of the Flow Vector Data Texture.
const int GetNextPowerOfTwo (const int iNumber)
 Calculates the next power of 2.
void uploadTransferTexture (float *tex)
 Loads the Transfer Texture (set by the Transfer Texture Widget) to the graphic hardware.
bool isDatasetLoaded ()
 Query to the Flow Widget if currently a Flow Dataset is loaded.
QStringList & getChannelNames ()
 Returns the Channel Names of the loaded Flow Dataset.

Protected Member Functions

void initializeGL ()
 Initializes the OpenGL Context.
void paintGL ()
 This method covers the OpenGL render loop.
void resizeGL (int width, int height)
 Updates the Viewport and Projection if the widged is resized.


Detailed Description

OpenGL Widget which renders Glyphs or Streamlines (evenly spaced) of a 2D Flow Dataset. (depending on the render mode).

See also:
QGLWidget

Constructor & Destructor Documentation

FlowWidget::FlowWidget ( QWidget *  parent = 0,
const QGLWidget *  shareWidget = 0,
Qt::WindowFlags  f = 0 
)

Constructor of FlowWidget Class.

Parameters:
parent Pointer to parent Widget
shareWidget Pointer to GLWidget which shares Textures and DisplayLists with this GLWidget.
f Qt::WindowFlags
See also:
QGLWidget


Member Function Documentation

QStringList & FlowWidget::getChannelNames (  ) 

Returns the Channel Names of the loaded Flow Dataset.

Returns:
QStringList containing the Channel Names.

const int FlowWidget::GetNextPowerOfTwo ( const int  iNumber  ) 

Calculates the next power of 2.

Parameters:
iNumber Int value of which the next power of 2 will be calculated.
Returns:
The next power of 2.

unsigned int FlowWidget::getTexture (  ) 

Returns the Texture Handle of the Flow Vector Data Texture.

Returns:
The Texture Handle

unsigned int * FlowWidget::getTextureP (  ) 

Returns a Pointer to the Texture Handle of the Flow Vector Data Texture.

Returns:
Pointer to the Texture Handle

bool FlowWidget::isDatasetLoaded (  ) 

Query to the Flow Widget if currently a Flow Dataset is loaded.

Returns:
TRUE if an Flow Dataset is loaded.

QSize FlowWidget::minimumSizeHint (  )  const

Returns the minimum Size of the Widget.

Returns:
Minimum Size of the Widget.

void FlowWidget::setCurrentChannelTexture ( int  val  )  [slot]

Sets the texture handle of the texture which will then be the active Channel Texture.

Parameters:
val Texture handle

void FlowWidget::setDataChannelActive ( int  val  )  [slot]

Activates or deactivates Data Channel Rendering.

Parameters:
val Qt::Checked or Qt::Unchecked

void FlowWidget::setDSep ( int  val  )  [slot]

Sets the minimal distance for planting new streamline seed points.

Parameters:
val Minimal seedpoint distance

void FlowWidget::setDTest ( int  val  )  [slot]

Sets the percentage of DSep as minimal distance until a streamline calculation will be stopped.

Parameters:
val Minimal streamline distance.

void FlowWidget::setEulerStepSize ( double  val  )  [slot]

Sets the step size for Euler Integration Mode.

Parameters:
val The step size

void FlowWidget::setFlow ( FlowData flow  ) 

Sets the Flow Dataset which will be rendered.

Parameters:
flow The Flow Dataset

void FlowWidget::setGlyphActive ( int  val  )  [slot]

Activates or deactivates Glyph Rendering.

Parameters:
val Qt::Checked or Qt::Unchecked

void FlowWidget::setGlyphAlpha ( int  val  )  [slot]

Sets the transparency of the Glyphs.

Parameters:
val Transparency value (100 to 0)

void FlowWidget::setGlyphColorCoding ( int  val  )  [slot]

Activates or deactivates color coding of the Glyphs.

Parameters:
val Qt::Checked or Qt::Unchecked

void FlowWidget::setGlyphScaling ( int  val  )  [slot]

Activates or deactivates Glyph Scaling.

Parameters:
val Qt::Checked or Qt::Unchecked

void FlowWidget::setGlyphSize ( int  val  )  [slot]

Sets the size of the Glyphs.

Parameters:
val Glyph size

void FlowWidget::setGlyphSpacing ( int  val  )  [slot]

Sets the spacing between the Glyphs.

Parameters:
val Spacing between the Glyphs

void FlowWidget::setRK2StepSize ( double  val  )  [slot]

Sets the step size for Runge-Kutta Integration Mode.

Parameters:
val The step size

void FlowWidget::setStepSize ( int  val  )  [slot]

Sets the step size for the evenly spaced streamlines calculation.

Parameters:
val The step size

QSize FlowWidget::sizeHint (  )  const

Returns the Size of the Widget.

Returns:
Size of the Widget.

void FlowWidget::uploadTransferTexture ( float *  tex  ) 

Loads the Transfer Texture (set by the Transfer Texture Widget) to the graphic hardware.

Parameters:
tex Pointer to Transfer Texture float array.


The documentation for this class was generated from the following files:

Generated on Wed Jan 21 15:35:43 2009 for Flow Visualization by  doxygen 1.5.7.1