GpuThesis::Fire3dSimulator Class Reference

#include <Fire3dSimulator.h>

Inheritance diagram for GpuThesis::Fire3dSimulator:

GpuThesis::FireParameters GpuThesis::Runnable List of all members.

Public Member Functions

 Fire3dSimulator (unsigned int width, unsigned int height, unsigned int depth, Fluid3dSolver::FluidFactory *factory, FireFactory *fireFactory, Fluid3dSolver::BoundaryType densityBoundary, Fluid3dSolver::BoundaryType velocityBoundary)
OpenGL::Flat3dTextureSetgetFlat3dTextureSet ()
unsigned int getVelocityTexture () const
unsigned int getColorTexture () const
unsigned int getSmokeTexture () const
void setFuelSources (const Util::VoxelGrid< float > &values)
void setTemperatureSources (const Util::VoxelGrid< float > &values)
void setColorTable (const std::vector< float > &values, unsigned int dimension)
float getVoxelSize () const
void ignite (float timestep)
void setUniformAdvection (const Math::Vector3d &distance)

Private Member Functions

void doRun (float timestep)
void doReset ()

Detailed Description

The Fire3dSimulator class is used to perform a complete fire simulation in a specified domain. The simulation will use a fluid solver in combination with fire specific combustion modeling. The Fire3dSimulator class can represent various simulation types by specifying different abstract factories in the constructor.


Constructor & Destructor Documentation

GpuThesis::Fire3dSimulator::Fire3dSimulator unsigned int  width,
unsigned int  height,
unsigned int  depth,
Fluid3dSolver::FluidFactory factory,
FireFactory fireFactory,
Fluid3dSolver::BoundaryType  densityBoundary,
Fluid3dSolver::BoundaryType  velocityBoundary
 

Constructs a Fire3dSimulator.

Parameters:
width the computation width of the simulation domain.
height the computation height of the simulation domain.
depth the computation depth of the simulation domain.
factory the fluid factory used to initialize the fluid solver.
fireFactory the fire factory used to initialize the fire specific combustion modeling.
densityBoundary the boundary type used for the fire specific density field.
velocityBoundary the boundary type used for the velocity field.


Member Function Documentation

void GpuThesis::Fire3dSimulator::doReset  )  [private, virtual]
 

Implemented by subclasses.

Implements GpuThesis::Runnable.

void GpuThesis::Fire3dSimulator::doRun float  timestep  )  [private, virtual]
 

Implemented by subclasses.

Parameters:
timestep The timestep to run.

Implements GpuThesis::Runnable.

unsigned int GpuThesis::Fire3dSimulator::getColorTexture  )  const
 

Returns the texture id of the color texture. This texture contains the visual results of the fire simulation.

Returns:
the texture id.

OpenGL::Flat3dTextureSet * GpuThesis::Fire3dSimulator::getFlat3dTextureSet  ) 
 

Returns the texture set containing all the simulation textures.

Returns:
the texture set.

unsigned int GpuThesis::Fire3dSimulator::getSmokeTexture  )  const
 

Returns the texture id of the smoke texture. This texture contains the smoke of the fire simulation.

Returns:
the texture id.

unsigned int GpuThesis::Fire3dSimulator::getVelocityTexture  )  const
 

Returns the texture id of the velocity texture.

Returns:
the texture id.

float GpuThesis::Fire3dSimulator::getVoxelSize  )  const
 

Returns the voxel size used in the simulation domain.

Returns:
the voxel size.

void GpuThesis::Fire3dSimulator::ignite float  timestep  ) 
 

Ignites the fire simulation by setting the fire threshold below zero for timestep seconds.

Parameters:
timestep the duration of the ignition.

void GpuThesis::Fire3dSimulator::setColorTable const std::vector< float > &  values,
unsigned int  dimension
 

Sets the color table to be used when computing the final color texture. The color table should contain the range of colors expected to be seen in the fire, from dark to bright colors. The values in the color table vector should be in the range 0-1, and stored on the form (red, green, blue) * dimension.

Parameters:
values the color table values.
dimension the dimension (length) of the color table.

void GpuThesis::Fire3dSimulator::setFuelSources const Util::VoxelGrid< float > &  values  ) 
 

Sets the fuel sources to be used in the fire simulation.

Parameters:
values a voxel grid containing the fuel sources.

void GpuThesis::Fire3dSimulator::setTemperatureSources const Util::VoxelGrid< float > &  values  ) 
 

Sets the temperature sources to be used in the fire simulation.

Parameters:
values a voxel grid containing the temperature sources.

void GpuThesis::Fire3dSimulator::setUniformAdvection const Math::Vector3d &  distance  ) 
 

Advects the contents of the fire simulation (density and velocity). Note that distance must be in local simulation scale.

Parameters:
distance the distance to advect.


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 08:42:50 2006 for GPU Thesis by  doxygen 1.4.6-NO