Public Member Functions | Protected Member Functions | Private Slots | Private Attributes
MainWindow Class Reference

The functions and elements of a MainWindow. More...

#include <MainWindow.h>

List of all members.

Public Member Functions

 MainWindow (QWidget *parent=0)
 ~MainWindow ()

Protected Member Functions

void keyPressEvent (QKeyEvent *_event)
void keyReleaseEvent (QKeyEvent *_event)

Private Slots

void setUIBuoyancyValues (float _kRise, float _kFall)
 Signal sent to the UI to set the dissipation values.
void setUIDissipationValues (float _kDensityDiss, float _kTemperDiss)
 Signal sent to the UI to set the dissipation values.
void setUIEmitterValues (ngl::Vec3 _emitterLoc, float _emitterSize, float _emitDensityRate, float _emitTemperatureRate)
 Signal sent to the UI to set the emitter values.
void setUIFluidValues (float _viscosity, float _gravity, float _kVorticity)
 Signal sent to the UI to set the fluid values.
void setUIObstacleValues ()
 Signal sent to the UI to set the obstacle values.
void setUIPressureValues (float _absoluteTolerance, float _relaxationRate)
 Signal sent to the UI to set the fluid values.
void setUINoiseValues (float _frequency, float _octaveCount, float _persistence, float _speed, float _magnitude)
 Signal sent to the UI to set the sprite values.
void setUISpriteValues (int _spriteSize, float _opacityStrength, float _shadowStrength)
 Signal sent to the UI to set the sprite values.
void setUITimeValues (float _timeStep, float _maxFPS)
 Signal sent to the UI to set the time values.
void setUIVoxelGridValues (float _gridLengthX, float _gridLengthY, float _gridLengthZ, int _gridBaseRes, int _gridPrecisionX, int _gridPrecisionY, int _gridPrecisionZ, float _h, BOUNDARYCONDITION _condition)
 Signal sent to the UI to set the Voxel Grid UI Values.

Private Attributes

Ui::MainWindow * m_ui
GLWindowm_gl
 our openGL widget

Detailed Description

The functions and elements of a MainWindow.


Constructor & Destructor Documentation

MainWindow::MainWindow ( QWidget *  parent = 0) [explicit]

1. Connect the signals in GLWindow to the signals in MainWindow.

2. Connect the ui variables to the slots in GLWindow.

1. De-allocate memory.


Member Function Documentation

void MainWindow::keyPressEvent ( QKeyEvent *  _event) [protected]

1. If the escape key is pressed, exit. If the 'a' key is pressed, toggle the pausing of the simulation.

void MainWindow::keyReleaseEvent ( QKeyEvent *  _event) [protected]

1. On the event of a key release event, call the processKeyUp function in the GLWindow instance.

void MainWindow::setUIBuoyancyValues ( float  _kRise,
float  _kFall 
) [private, slot]

Signal sent to the UI to set the dissipation values.

Parameters:
[in]_kRisethe value to be set to the k buoyancy rise value
[in]_kFallthe value to be set to the k buoyancy fall value

1. Set the UI buoyancy values.

void MainWindow::setUIDissipationValues ( float  _kDensityDiss,
float  _kTemperDiss 
) [private, slot]

Signal sent to the UI to set the dissipation values.

Parameters:
[in]_kDensityDissthe value to be set to the k density dissipation value
[in]_kTemperDissthe value to be set to the k temperature dissipation value

1. Set the UI dissipation values.

void MainWindow::setUIEmitterValues ( ngl::Vec3  _emitterLoc,
float  _emitterSize,
float  _emitDensityRate,
float  _emitTemperatureRate 
) [private, slot]

Signal sent to the UI to set the emitter values.

Parameters:
[in]_emitterLocthe value to be set to the location of the emitter
[in]_emitterSizethe value to be set to the size of the emitter
[in]_emitDensityRatethe value to be set to the emit rate of the density
[in]_emitTemperatureRatethe value to be set to the emit rate of the temperature

1. Set the UI emitter values.

void MainWindow::setUIFluidValues ( float  _viscosity,
float  _gravity,
float  _kVorticity 
) [private, slot]

Signal sent to the UI to set the fluid values.

Parameters:
[in]_viscositythe value to be set to the viscosity
[in]_gravitythe value to be set to the gravity force
[in]_kVorticitythe value to be set to vorticity confinement constant

1. Set the UI fluid values.

void MainWindow::setUINoiseValues ( float  _frequency,
float  _octaveCount,
float  _persistence,
float  _speed,
float  _magnitude 
) [private, slot]

Signal sent to the UI to set the sprite values.

Parameters:
[in]_frequencythe value to be set to the frequency of the noise
[in]_octaveCountthe value to be set to the octave count of the noise
[in]_persistencethe value to be set to the persistence of the noise
[in]_speedthe value to be set to the speed of the noise
[in]_magnitudethe value to be set to the magnitude of the force the noise

1. Set the UI noise values.

void MainWindow::setUIObstacleValues ( ) [private, slot]

Signal sent to the UI to set the obstacle values.

1. Set the UI obstacle values.

void MainWindow::setUIPressureValues ( float  _absoluteTolerance,
float  _relaxationRate 
) [private, slot]

Signal sent to the UI to set the fluid values.

Parameters:
[in]_absoluteTolerancethe value to be set to the absolute tolerance of the pressure
[in]_relaxationRatethe value to be set to the relaxation rate of the pressure

1. Set the UI pressure values.

void MainWindow::setUISpriteValues ( int  _spriteSize,
float  _opacityStrength,
float  _shadowStrength 
) [private, slot]

Signal sent to the UI to set the sprite values.

Parameters:
[in]_spriteSizethe value to be set to the k sprite size value
[in]_opacityStrengththe value to be set to the strength of the opacity
[in]_shadowStrengththe value to be set to the strength of the opacity

1. Set the UI sprite values.

void MainWindow::setUITimeValues ( float  _timeStep,
float  _maxFPS 
) [private, slot]

Signal sent to the UI to set the time values.

Parameters:
[in]_timeStepthe value to be set to the time step
[in]_maxFPSthe value to be set to the max fps

1. Set the UI time values.

void MainWindow::setUIVoxelGridValues ( float  _gridLengthX,
float  _gridLengthY,
float  _gridLengthZ,
int  _gridBaseRes,
int  _gridPrecisionX,
int  _gridPrecisionY,
int  _gridPrecisionZ,
float  _h,
BOUNDARYCONDITION  _condition 
) [private, slot]

Signal sent to the UI to set the Voxel Grid UI Values.

Parameters:
[in]_gridLengthXthe x length of the voxel grid
[in]_gridLengthYthe y length of the voxel grid
[in]_gridLengthZthe z length of the voxel grid
[in]_gridBaseResthe base resolution of the voxel grid
[in]_gridPrecisionXthe x precision of the voxel grid
[in]_gridPrecisionYthe y precision of the voxel grid
[in]_gridPrecisionZthe z precision of the voxel grid
[in]_hthe width of the voxels
[in]_conditionthe boundary condition

1. Set the UI voxel grid values.

2. Set the UI boundary condition.


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