palDampendShallowFluid Class Reference

#include <palFluid.h>

Inheritance diagram for palDampendShallowFluid:

palGridFluid

List of all members.

Public Member Functions

void Init (int dimX=128, int dimY=128, float cellSize=0.08, float density=1000, float dampingFluid=0.01, float dampingBody_linear=0.02, float dampingBody_angular=0.04)
virtual void Update ()


Detailed Description

A 2D "heightmap" fluid based on finite difference dampend shallow water equations

Member Function Documentation

void palDampendShallowFluid::Init ( int  dimX = 128,
int  dimY = 128,
float  cellSize = 0.08,
float  density = 1000,
float  dampingFluid = 0.01,
float  dampingBody_linear = 0.02,
float  dampingBody_angular = 0.04 
)

Initializes the fluid to a given grid size with each grid cell having a specified size. Must be called before any other function.

Parameters:
dimX The x-dimension of the grid
dimY The y-dimension of the grid
cellSize The real world size of the cell in the grid. The total water dimensions is [dimX*cellSize, dimY*cellSize]
density The fluid density (eg: 1000)
dampingFluid The damping coefficient for the fluid itself - controls the fluid's energy levels (try 0.04 - 0.0001)
dampingBody_linear Linear damping (simplified version of palLiquidDrag)
dampingBody_angular Angular damping (simplified version of palLiquidDrag)

void palDampendShallowFluid::Update (  )  [virtual]

Updates the fluid.

Implements palGridFluid.


The documentation for this class was generated from the following files:

Generated on Mon Aug 31 13:58:02 2009 for pal by  doxygen 1.5.7.1