Eulerian Smoke Simulation on the GPU
|
The Qt OpenGL window widget. More...
#include <GLWindow.h>
Public Types | |
enum | FieldToRender { VELOCITY, PRESSURE, TEMPERATURE, DENSITY } |
enum | BackgroundType { LIGHT, DARK } |
Public Slots | |
void | setIsoLevel (float _isoLevel) |
Sets the mesh iso level value. | |
void | setSamplingChannel (int _channelIndex) |
Sets the 3D texture channel to sample from. | |
void | setMeshingMethod (int _method) |
Changes the active meshing method. | |
void | toggleSimulation () |
Runs / stops the simulation. | |
void | toggleMesh (bool _displayMesh) |
Sets the mesh visibility flag. | |
void | setMeshField (int _meshField) |
Sets the field to render as a mesh. | |
void | toggleObstacles (bool _displayObstacles) |
Sets the obstacles' visibility flag. | |
void | setObstacleGeometry (int _geoIndex) |
Sets the simulation obstacle's geometry. | |
void | toggleGridPlane (bool _displayGridPlane) |
Sets the grid plane's visibility flag. | |
void | toggleContainer (bool _displayContainer) |
Sets the container's visibility flag. | |
void | toggleLightIcon (bool _displayLightIcon) |
Sets the light icon visibility flag. | |
void | setLightPosition (float _posX, float _posY, float _posZ) |
Sets the light's position. | |
void | setLightAttenuation (float _constant, float _linear, float _quadratic) |
Set the light's attenuation. | |
void | setLightColour (float _r, float _g, float _b) |
Sets the light's colour. | |
void | setLightSpecColour (float _r, float _g, float _b) |
Sets the light's specular colour. | |
void | toggleSlice (bool _displaySlice) |
Sets the slice's visibility flag. | |
void | setSliceField (int _sliceField) |
Sets the field to render as a slice. | |
void | setSliceOpacity (double _opacity) |
Sets the slice's opacity. | |
void | setSlicePos (int _slicePos) |
Sets the slice's position on the Z axis. | |
void | setBGType (int _bgType) |
Sets the background colour type. | |
void | setMeshColour (float _r, float _g, float _b) |
Sets the mesh's colour. | |
void | setMeshMaterial (int _materialIndex) |
Sets the mesh's material. | |
void | setCellSize (double _cellSize) |
Sets the simulation's cell size. | |
void | setSplatRadius (double _splatRadius) |
Sets the splat radius. | |
void | setAmbientTemperature (double _ambientTemperature) |
Sets the ambient temperature. | |
void | setImpulseTemperature (double _impulseTemperature) |
Sets the impulse temperature. | |
void | setImpulseDensity (double _impulseDensity) |
Sets the impulse density. | |
void | setImpulsePosition (double _posX, double _posY, double _posZ) |
Sets the impulse position. | |
void | setPoissonIterations (int _numPoissonIterations) |
Sets the number of iterations of the Poisson solver. | |
void | setTimestep (double _timestep) |
Set the time-step. | |
void | setBuoyancyLift (double _buoyancyLift) |
Sets the buoyancy lift constant. | |
void | setGasWeight (double _gasWeight) |
Sets the gas' weight. | |
void | setBuoyancyDirection (float _dirX, float _dirY, float _dirZ) |
Sets the buoyancy force direction. | |
void | togglePeriodicNoise (bool _enablePeriodicNoise) |
Toggles the periodic noise function. | |
void | setNoiseVariance (float _noiseVarianceX, float _noiseVarianceY, float _noiseVarianceZ) |
Sets the periodic noise variance. | |
void | setNoiseDrivingFunc (int _funcIndexX, int _funcIndexY, int _funcIndexZ) |
Sets the periodic noise driving function. | |
void | setTemperatureDissipation (double _temperatureDissipation) |
Sets the temperature dissipation factor. | |
void | setDensityDissipation (double _densityDissipation) |
Sets the density dissipation factor. | |
void | setVelocityDissipation (double _velocityDissipation) |
Sets the velocity dissipation factor. | |
Public Member Functions | |
GLWindow (QWidget *_parent) | |
Constructor. | |
~GLWindow () | |
Destructor. | |
Protected Member Functions | |
void | initializeGL () |
Initialization function for the OpenGL context. this is called when the window is created. | |
void | resizeGL (const int _w, const int _h) |
this Resizing function for the OpenGL window. | |
void | paintGL () |
The main OpenGL drawing routine. It is called whenever the window needs to be re-drawn. |
The Qt OpenGL window widget.
GLWindow::GLWindow | ( | QWidget * | _parent | ) |
Constructor.
[in] | _parent | the parent window to create the GL context in |
void GLWindow::resizeGL | ( | const int | _w, |
const int | _h | ||
) | [protected] |
this Resizing function for the OpenGL window.
[in] | _w | the width of the resized window |
[in] | _h | the height of the resized window |
void GLWindow::setAmbientTemperature | ( | double | _ambientTemperature | ) | [inline, slot] |
Sets the ambient temperature.
[in] | _ambientTemperature | the new ambient temperature |
void GLWindow::setBGType | ( | int | _bgType | ) | [slot] |
Sets the background colour type.
[in] | _bgType | the type of background colour |
void GLWindow::setBuoyancyDirection | ( | float | _dirX, |
float | _dirY, | ||
float | _dirZ | ||
) | [inline, slot] |
Sets the buoyancy force direction.
[in] | _dirX | the direction in X |
[in] | _dirY | the direction in Y |
[in] | _dirZ | the direction in Z |
void GLWindow::setBuoyancyLift | ( | double | _buoyancyLift | ) | [inline, slot] |
Sets the buoyancy lift constant.
[in] | _buoyancyLift | the new buoyancy lift constant |
void GLWindow::setCellSize | ( | double | _cellSize | ) | [inline, slot] |
Sets the simulation's cell size.
[in] | _cellSize | the new cell size |
void GLWindow::setDensityDissipation | ( | double | _densityDissipation | ) | [inline, slot] |
Sets the density dissipation factor.
[in] | _densityDissipation | the new density dissipation |
void GLWindow::setGasWeight | ( | double | _gasWeight | ) | [inline, slot] |
Sets the gas' weight.
[in] | _gasWeight | the new gas weight |
void GLWindow::setImpulseDensity | ( | double | _impulseDensity | ) | [inline, slot] |
Sets the impulse density.
[in] | _impulseDensity | the new impulse density |
void GLWindow::setImpulsePosition | ( | double | _posX, |
double | _posY, | ||
double | _posZ | ||
) | [inline, slot] |
Sets the impulse position.
[in] | _posX | the X coordinate of the splat |
[in] | _posY | the Y coordinate of the splat |
[in] | _posZ | the Z coordinate of the splat |
void GLWindow::setImpulseTemperature | ( | double | _impulseTemperature | ) | [inline, slot] |
Sets the impulse temperature.
[in] | _impulseTemperature | the new impulse temperature |
void GLWindow::setIsoLevel | ( | float | _isoLevel | ) | [slot] |
Sets the mesh iso level value.
[in] | _isoLevel | the new iso level |
void GLWindow::setLightAttenuation | ( | float | _constant, |
float | _linear, | ||
float | _quadratic | ||
) | [slot] |
Set the light's attenuation.
[in] | _constant | the constant attenuation |
[in] | _linear | the linear attenuation |
[in] | _quadratic | the quadratic attenuation |
void GLWindow::setLightColour | ( | float | _r, |
float | _g, | ||
float | _b | ||
) | [slot] |
Sets the light's colour.
[in] | _r | the colour's red channel |
[in] | _g | the colour's green channel |
[in] | _b | the colour's blue channel; |
void GLWindow::setLightPosition | ( | float | _posX, |
float | _posY, | ||
float | _posZ | ||
) | [slot] |
Sets the light's position.
[in] | _posX | the X coordinate |
[in] | _posY | the Y coordinate |
[in] | _posZ | the Z coordinate |
void GLWindow::setLightSpecColour | ( | float | _r, |
float | _g, | ||
float | _b | ||
) | [slot] |
Sets the light's specular colour.
[in] | _r | the colour's red channel |
[in] | _g | the colour's green channel |
[in] | _b | the colour's blue channel; |
void GLWindow::setMeshColour | ( | float | _r, |
float | _g, | ||
float | _b | ||
) | [slot] |
Sets the mesh's colour.
[in] | _r | the colour's red channel |
[in] | _g | the colour's green channel |
[in] | _b | the colour's blue channel |
void GLWindow::setMeshField | ( | int | _meshField | ) | [slot] |
Sets the field to render as a mesh.
[in] | _meshField | the new field to mesh |
void GLWindow::setMeshingMethod | ( | int | _method | ) | [slot] |
Changes the active meshing method.
[in] | _method | the meshing method |
void GLWindow::setMeshMaterial | ( | int | _materialIndex | ) | [slot] |
Sets the mesh's material.
[in] | _materialIndex | the material's index |
void GLWindow::setNoiseDrivingFunc | ( | int | _funcIndexX, |
int | _funcIndexY, | ||
int | _funcIndexZ | ||
) | [inline, slot] |
Sets the periodic noise driving function.
[in] | _funcIndexX | the index of the driving function in X |
[in] | _funcIndexY | the index of the driving function in Y |
[in] | _funcIndexZ | the index of the driving function in Z |
void GLWindow::setNoiseVariance | ( | float | _noiseVarianceX, |
float | _noiseVarianceY, | ||
float | _noiseVarianceZ | ||
) | [inline, slot] |
Sets the periodic noise variance.
[in] | _noiseVarianceX | the turbulance variance in X |
[in] | _noiseVarianceY | the turbulance variance in Y |
[in] | _noiseVarianceZ | the turbulance variance in Z |
void GLWindow::setObstacleGeometry | ( | int | _geoIndex | ) | [slot] |
Sets the simulation obstacle's geometry.
[in] | _geoIndex | the geometry index |
void GLWindow::setPoissonIterations | ( | int | _numPoissonIterations | ) | [inline, slot] |
Sets the number of iterations of the Poisson solver.
[in] | _numPoissonIterations | the number of iterations |
void GLWindow::setSamplingChannel | ( | int | _channelIndex | ) | [slot] |
Sets the 3D texture channel to sample from.
[in] | _channelIndex | the index of the channel to sample |
void GLWindow::setSliceField | ( | int | _sliceField | ) | [slot] |
Sets the field to render as a slice.
[in] | _sliceField | the new field to slice |
void GLWindow::setSliceOpacity | ( | double | _opacity | ) | [slot] |
Sets the slice's opacity.
[in] | _opacity | the new opacity |
void GLWindow::setSlicePos | ( | int | _slicePos | ) | [slot] |
Sets the slice's position on the Z axis.
[in] | _slicePos | the new slice position |
void GLWindow::setSplatRadius | ( | double | _splatRadius | ) | [inline, slot] |
Sets the splat radius.
[in] | _splatRadius | the new splat radius |
void GLWindow::setTemperatureDissipation | ( | double | _temperatureDissipation | ) | [inline, slot] |
Sets the temperature dissipation factor.
[in] | _temperatureDissipation | the new temperature dissipation |
void GLWindow::setTimestep | ( | double | _timestep | ) | [inline, slot] |
Set the time-step.
[in] | _timestep | the new time-step |
void GLWindow::setVelocityDissipation | ( | double | _velocityDissipation | ) | [inline, slot] |
Sets the velocity dissipation factor.
[in] | _velocityDissipation | the new velocity dissipation |
void GLWindow::toggleContainer | ( | bool | _displayContainer | ) | [slot] |
Sets the container's visibility flag.
[in] | _displayContainer | the visibility flag |
void GLWindow::toggleGridPlane | ( | bool | _displayGridPlane | ) | [slot] |
Sets the grid plane's visibility flag.
[in] | _displayGridPlane | the visibility flag |
void GLWindow::toggleLightIcon | ( | bool | _displayLightIcon | ) | [slot] |
Sets the light icon visibility flag.
[in] | _displayLightIcon | the visibility flag |
void GLWindow::toggleMesh | ( | bool | _displayMesh | ) | [slot] |
Sets the mesh visibility flag.
[in] | _displayMesh | the visibility flag |
void GLWindow::toggleObstacles | ( | bool | _displayObstacles | ) | [slot] |
Sets the obstacles' visibility flag.
[in] | _displayObstacles | the visibility flag |
void GLWindow::togglePeriodicNoise | ( | bool | _enablePeriodicNoise | ) | [inline, slot] |
Toggles the periodic noise function.
[in] | _enablePeriodicNoise | the periodic noise toggling flag |
void GLWindow::toggleSlice | ( | bool | _displaySlice | ) | [slot] |
Sets the slice's visibility flag.
[in] | _displayField | the visibility flag |