Eulerian Smoke Simulation on the GPU
GLWindow Class Reference

The Qt OpenGL window widget. More...

#include <GLWindow.h>

List of all members.

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.

Detailed Description

The Qt OpenGL window widget.

Author:
Nikolaos Verigakis
Version:
1.0
Date:
10/04/11 Revision History : Initial Version 10/04/11

Constructor & Destructor Documentation

GLWindow::GLWindow ( QWidget *  _parent)

Constructor.

Parameters:
[in]_parentthe parent window to create the GL context in

Member Function Documentation

void GLWindow::resizeGL ( const int  _w,
const int  _h 
) [protected]

this Resizing function for the OpenGL window.

Parameters:
[in]_wthe width of the resized window
[in]_hthe height of the resized window
void GLWindow::setAmbientTemperature ( double  _ambientTemperature) [inline, slot]

Sets the ambient temperature.

Parameters:
[in]_ambientTemperaturethe new ambient temperature
void GLWindow::setBGType ( int  _bgType) [slot]

Sets the background colour type.

Parameters:
[in]_bgTypethe type of background colour
void GLWindow::setBuoyancyDirection ( float  _dirX,
float  _dirY,
float  _dirZ 
) [inline, slot]

Sets the buoyancy force direction.

Parameters:
[in]_dirXthe direction in X
[in]_dirYthe direction in Y
[in]_dirZthe direction in Z
void GLWindow::setBuoyancyLift ( double  _buoyancyLift) [inline, slot]

Sets the buoyancy lift constant.

Parameters:
[in]_buoyancyLiftthe new buoyancy lift constant
void GLWindow::setCellSize ( double  _cellSize) [inline, slot]

Sets the simulation's cell size.

Parameters:
[in]_cellSizethe new cell size
void GLWindow::setDensityDissipation ( double  _densityDissipation) [inline, slot]

Sets the density dissipation factor.

Parameters:
[in]_densityDissipationthe new density dissipation
void GLWindow::setGasWeight ( double  _gasWeight) [inline, slot]

Sets the gas' weight.

Parameters:
[in]_gasWeightthe new gas weight
void GLWindow::setImpulseDensity ( double  _impulseDensity) [inline, slot]

Sets the impulse density.

Parameters:
[in]_impulseDensitythe new impulse density
void GLWindow::setImpulsePosition ( double  _posX,
double  _posY,
double  _posZ 
) [inline, slot]

Sets the impulse position.

Parameters:
[in]_posXthe X coordinate of the splat
[in]_posYthe Y coordinate of the splat
[in]_posZthe Z coordinate of the splat
void GLWindow::setImpulseTemperature ( double  _impulseTemperature) [inline, slot]

Sets the impulse temperature.

Parameters:
[in]_impulseTemperaturethe new impulse temperature
void GLWindow::setIsoLevel ( float  _isoLevel) [slot]

Sets the mesh iso level value.

Parameters:
[in]_isoLevelthe new iso level
void GLWindow::setLightAttenuation ( float  _constant,
float  _linear,
float  _quadratic 
) [slot]

Set the light's attenuation.

Parameters:
[in]_constantthe constant attenuation
[in]_linearthe linear attenuation
[in]_quadraticthe quadratic attenuation
void GLWindow::setLightColour ( float  _r,
float  _g,
float  _b 
) [slot]

Sets the light's colour.

Parameters:
[in]_rthe colour's red channel
[in]_gthe colour's green channel
[in]_bthe colour's blue channel;
void GLWindow::setLightPosition ( float  _posX,
float  _posY,
float  _posZ 
) [slot]

Sets the light's position.

Parameters:
[in]_posXthe X coordinate
[in]_posYthe Y coordinate
[in]_posZthe Z coordinate
void GLWindow::setLightSpecColour ( float  _r,
float  _g,
float  _b 
) [slot]

Sets the light's specular colour.

Parameters:
[in]_rthe colour's red channel
[in]_gthe colour's green channel
[in]_bthe colour's blue channel;
void GLWindow::setMeshColour ( float  _r,
float  _g,
float  _b 
) [slot]

Sets the mesh's colour.

Parameters:
[in]_rthe colour's red channel
[in]_gthe colour's green channel
[in]_bthe colour's blue channel
void GLWindow::setMeshField ( int  _meshField) [slot]

Sets the field to render as a mesh.

Parameters:
[in]_meshFieldthe new field to mesh
void GLWindow::setMeshingMethod ( int  _method) [slot]

Changes the active meshing method.

Parameters:
[in]_methodthe meshing method
void GLWindow::setMeshMaterial ( int  _materialIndex) [slot]

Sets the mesh's material.

Parameters:
[in]_materialIndexthe material's index
void GLWindow::setNoiseDrivingFunc ( int  _funcIndexX,
int  _funcIndexY,
int  _funcIndexZ 
) [inline, slot]

Sets the periodic noise driving function.

Parameters:
[in]_funcIndexXthe index of the driving function in X
[in]_funcIndexYthe index of the driving function in Y
[in]_funcIndexZthe index of the driving function in Z
void GLWindow::setNoiseVariance ( float  _noiseVarianceX,
float  _noiseVarianceY,
float  _noiseVarianceZ 
) [inline, slot]

Sets the periodic noise variance.

Parameters:
[in]_noiseVarianceXthe turbulance variance in X
[in]_noiseVarianceYthe turbulance variance in Y
[in]_noiseVarianceZthe turbulance variance in Z
void GLWindow::setObstacleGeometry ( int  _geoIndex) [slot]

Sets the simulation obstacle's geometry.

Parameters:
[in]_geoIndexthe geometry index
void GLWindow::setPoissonIterations ( int  _numPoissonIterations) [inline, slot]

Sets the number of iterations of the Poisson solver.

Parameters:
[in]_numPoissonIterationsthe number of iterations
void GLWindow::setSamplingChannel ( int  _channelIndex) [slot]

Sets the 3D texture channel to sample from.

Parameters:
[in]_channelIndexthe index of the channel to sample
void GLWindow::setSliceField ( int  _sliceField) [slot]

Sets the field to render as a slice.

Parameters:
[in]_sliceFieldthe new field to slice
void GLWindow::setSliceOpacity ( double  _opacity) [slot]

Sets the slice's opacity.

Parameters:
[in]_opacitythe new opacity
void GLWindow::setSlicePos ( int  _slicePos) [slot]

Sets the slice's position on the Z axis.

Parameters:
[in]_slicePosthe new slice position
void GLWindow::setSplatRadius ( double  _splatRadius) [inline, slot]

Sets the splat radius.

Parameters:
[in]_splatRadiusthe new splat radius
void GLWindow::setTemperatureDissipation ( double  _temperatureDissipation) [inline, slot]

Sets the temperature dissipation factor.

Parameters:
[in]_temperatureDissipationthe new temperature dissipation
void GLWindow::setTimestep ( double  _timestep) [inline, slot]

Set the time-step.

Parameters:
[in]_timestepthe new time-step
void GLWindow::setVelocityDissipation ( double  _velocityDissipation) [inline, slot]

Sets the velocity dissipation factor.

Parameters:
[in]_velocityDissipationthe new velocity dissipation
void GLWindow::toggleContainer ( bool  _displayContainer) [slot]

Sets the container's visibility flag.

Parameters:
[in]_displayContainerthe visibility flag
void GLWindow::toggleGridPlane ( bool  _displayGridPlane) [slot]

Sets the grid plane's visibility flag.

Parameters:
[in]_displayGridPlanethe visibility flag
void GLWindow::toggleLightIcon ( bool  _displayLightIcon) [slot]

Sets the light icon visibility flag.

Parameters:
[in]_displayLightIconthe visibility flag
void GLWindow::toggleMesh ( bool  _displayMesh) [slot]

Sets the mesh visibility flag.

Parameters:
[in]_displayMeshthe visibility flag
void GLWindow::toggleObstacles ( bool  _displayObstacles) [slot]

Sets the obstacles' visibility flag.

Parameters:
[in]_displayObstaclesthe visibility flag
void GLWindow::togglePeriodicNoise ( bool  _enablePeriodicNoise) [inline, slot]

Toggles the periodic noise function.

Parameters:
[in]_enablePeriodicNoisethe periodic noise toggling flag
void GLWindow::toggleSlice ( bool  _displaySlice) [slot]

Sets the slice's visibility flag.

Parameters:
[in]_displayFieldthe visibility flag

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