#include <glWidget.h>
Collaboration diagram for glWidget:
glWidget::glWidget | ( | flowData * | f, | |
ColorMapping * | arrowColorMap, | |||
ColorMapping * | backgroundColorMap, | |||
QWidget * | parent = 0 | |||
) |
constructor
*f | pointer to the data of the loaded files | |
*arrowColorMap | pointer to the color map from the arrow tab | |
*backgroundColormap | pointer to the color map fromt the background tab | |
*parent | pointer to the parent widget |
glWidget::~glWidget | ( | void | ) |
destructor
QSize glWidget::minimumSizeHint | ( | ) | const |
Returns
QSize glWidget::sizeHint | ( | ) | const |
Returns the size of the openGL area
void glWidget::updateData | ( | ) |
This function is called if the data files are changed, so that the streamlines and the background are updated .
void glWidget::mousePressEvent | ( | QMouseEvent * | event | ) | [private] |
predefined function of Qt
Is called every time a mouse button is pressed.
*event | contains data like the position of the mouse cursor and which button is pressed |
void glWidget::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [private] |
predefined function of Qt
Is called every time a pushed button is released.
*event | contains data like the position of the mouse cursor |
void glWidget::mouseMoveEvent | ( | QMouseEvent * | event | ) | [private] |
predefined function of Qt
Is called when the mouse is moved while a button is pressed.
*event | contains data like the position of the mouse cursor |
void glWidget::wheelEvent | ( | QWheelEvent * | event | ) | [private] |
predefined function of Qt
Is called every time the mouse wheel is turned.
*event | contains data like to which degree the wheel is turned. |
void glWidget::setProjection | ( | ) | [private] |
This function sets the data for the opengl projection matrix, depending on the grid size.
void glWidget::initializeGL | ( | ) | [protected] |
Called when the program is opened, for the basic settings.
void glWidget::paintGL | ( | ) | [protected] |
Is called for every new frame, decides whats painted in the openGL area.
It calls the draw function of the arrows object, streamlines object and background object if these should be shown.
void glWidget::resizeGL | ( | int | width, | |
int | height | |||
) | [protected] |
Is called every time the size of the openGL area is changed.
width | the new width of the window | |
height | the new height of the window |
void glWidget::update | ( | ) | [slot] |
This function updates the openGL window after changes.
void glWidget::changeArrowDistance | ( | int | i | ) | [slot] |
Is called when the distance between the arrows is changed.
Submits the new distance to the arrows object.
void glWidget::chooseSizeNone | ( | ) | [slot] |
Is called if all arrows should have the same size.
void glWidget::chooseSizeVelocity | ( | ) | [slot] |
Is called if the size of the arrows should depend on the velocity.
void glWidget::chooseSizePressure | ( | ) | [slot] |
Is called if the size of the arrows should depend on the pressure.
void glWidget::chooseSizeVorticity | ( | ) | [slot] |
Is called if the size of the arrows should depend on the vorticity.
void glWidget::chooseColorNone | ( | ) | [slot] |
Is called if all arrows should have the same color.
void glWidget::chooseColorVelocity | ( | ) | [slot] |
Is called if the color of the arrows should depend on the velocity.
void glWidget::chooseColorPressure | ( | ) | [slot] |
Is called if the color of the arrows should depend on the pressure.
void glWidget::chooseColorVorticity | ( | ) | [slot] |
Is called if the color of the arrows should depend on the vorticity.
void glWidget::changeArrowScale | ( | int | i | ) | [slot] |
Is called if the arrows should have a new size. The new size is submitted to the Arrows object.
i | the new size of the arrows |
void glWidget::changeArrowAlpha | ( | int | a | ) | [slot] |
Is called if the arrows should have a new alpha value. The new alpha value is submitted to the Arrows object.
void glWidget::toggleShowArrows | ( | ) | [slot] |
Is called if the user presses the 'show/ remove arrows' button. It decides whether the arrows should be shown or not.
void glWidget::toggleShowBackground | ( | ) | [slot] |
Is called if the user presses the 'show/ remove background' button. It decides whether the background should be shown or not.
void glWidget::toggleShowStreamlines | ( | ) | [slot] |
Is called if the user presses the 'show/ remove streamlines' button. It decides whether the streamlines should be shown or not.
void glWidget::setDt | ( | int | d | ) | [slot] |
This function is called if the dt Slider of the streamlines is changed.
This function submits the new dt value to the streamlines object.
d | new dt value |
void glWidget::setDtest | ( | int | d | ) | [slot] |
This function is called if the dTest Slider of the streamlines is changed.
This function submits the new dTest value to the streamlines object.
d | new dTest value |
void glWidget::setDsep | ( | int | d | ) | [slot] |
This function is called if the dSep Slider of the streamlines is changed.
This function submits the new dSep value to the streamlines object.*
d | new dSep value |
void glWidget::setEvenlySpacedMode | ( | ) | [slot] |
This function is called if the user wants that the streamlines should be evenly spaced.
*
void glWidget::setManualSeedingMode | ( | ) | [slot] |
This function is called if the user wants to manually seed the streamlines.
void glWidget::setRungeMode | ( | ) | [slot] |
Is called if the integration of the streamlines should be after the runge-kutta method.
void glWidget::setEulerMode | ( | ) | [slot] |
Is called if the integration of the streamlines should be after the euler method.
void glWidget::setBgVelocity | ( | ) | [slot] |
This function is called to set the Velocity Texture as background.
void glWidget::setBgPressure | ( | ) | [slot] |
This function is called to set the Pressure Texture as background.
void glWidget::setBgVorticity | ( | ) | [slot] |
This function is called to set the Vorticity Texture as background.
void glWidget::updateBgColor | ( | ) | [slot] |
This function is called when the color bar on the background tab is changed, and the background texture gets updated.
void glWidget::toggleTapering | ( | int | state | ) | [slot] |
This function says if the tapering is on orf off.
void glWidget::toggleGlyphs | ( | int | state | ) | [slot] |
Says if glphys should be shown or not.
void glWidget::toggleTexturing | ( | int | state | ) | [slot] |
Says if texturing is enabled or not.
bool glWidget::m_showArrows [private] |
bool glWidget::m_showBackground [private] |
true if the arrows should be displayed
bool glWidget::m_showStreamlines [private] |
true if the background should be displayed
GLfloat glWidget::m_zoomFactor [private] |
true if the streamlines should be displayed
GLfloat glWidget::m_translationX [private] |
stores the zoomfactor of the openGL scene
GLfloat glWidget::m_translationY [private] |
stores the translation of the scene on the x axis
GLfloat glWidget::m_left [private] |
stores the translation of the scene on the y axis
GLfloat glWidget::m_right [private] |
parameter for the projection matrix
GLfloat glWidget::m_top [private] |
parameter for the projection matrix
GLfloat glWidget::m_bottom [private] |
parameter for the projection matrix
GLint glWidget::m_width [private] |
parameter for the projection matrix
GLint glWidget::m_height [private] |
width of the glwindow
GLint glWidget::m_lastPosX [private] |
height of the glwindow
GLint glWidget::m_lastPosY [private] |
last x position of the mouse cursor
bool glWidget::m_mousePressed [private] |
last y position of the mouse cursor
int glWidget::m_streamlineMode [private] |
true if a mousebutton is pressed
Arrows* glWidget::arrow [private] |
stores if the streamline seeding is evenly spaced or manual
Background* glWidget::background [private] |
arrow object
Streamlines* glWidget::streamlines [private] |
backgroudn object
flowData* glWidget::FlowData [private] |
streamlines object
ColorMapping* glWidget::m_arrowColorMap [private] |
object with the data about the stream
ColorMapping* glWidget::m_backgroundColorMap [private] |
colormap from the arrows