proland::WaveTile Class Reference
[rivers]

WaveTile are Texture used to advect rivers normal. More...

#include <WaveTile.h>

Inheritance diagram for proland::WaveTile:
proland::AnimatedPerlinWaveTile proland::PerlinWaveTile

List of all members.

Public Member Functions

 WaveTile (string &name, ptr< Texture2D > tex, int gridSize, int tileSize, float waveLength, int timeLoop)
 Creates a new WaveTile.
virtual ~WaveTile ()
 Deletes this WaveTile.
virtual void timeStep (float dt)
 Updates the Texture depending on the time spent between the two images.
virtual void updateUniform (ptr< Program > p)
 Updates the GLSL uniforms.

Protected Member Functions

 WaveTile ()
 Creates a new WaveTile.
virtual void init (string &name, ptr< Texture2D > tex, int gridSize, int tileSize, float waveLength, int timeLoop)
 initializes the fields of a WaveTile.

Protected Attributes

string name
 Current wave tile's name.
ptr< Texture2D > tex
 The Texture2D that contains the wave profiles.
int gridSize
 Size of the texture.
int tileSize
 Size of a tile.
float time
 Current Time in the time cycle.
int timeLoop
 Number of frames of a wave cycle.
float waveLength
 Size of a wave.
ptr< Program > lastProgram
 Last updated program.
ptr< Uniform1f > timeU
 Current Time in the time cycle.
ptr< Uniform1f > timeLoopU
 Number of frames of a wave cycle.
ptr< Uniform1f > lengthU
 Size of a wave.
ptr< Uniform1f > patternTexSizeU
 Size of a wave pattern inside texture.
ptr< UniformSampler > patternTexU
 The sampler containing the texture.

Detailed Description

WaveTile are Texture used to advect rivers normal.

They can be updated through time, in order to change the waves profiles.

Author:
Antoine Begault

Constructor & Destructor Documentation

proland::WaveTile::WaveTile ( string &  name,
ptr< Texture2D >  tex,
int  gridSize,
int  tileSize,
float  waveLength,
int  timeLoop 
)

Creates a new WaveTile.

Parameters:
tex the Texture2D that contains the wave profiles.
gridSize size of the texture.
tileSize size of a tile.
waveLength size of a wave.
timeLoop number of frames of a wave cycle.
virtual proland::WaveTile::~WaveTile (  )  [virtual]

Deletes this WaveTile.

proland::WaveTile::WaveTile (  )  [protected]

Creates a new WaveTile.


Member Function Documentation

virtual void proland::WaveTile::init ( string &  name,
ptr< Texture2D >  tex,
int  gridSize,
int  tileSize,
float  waveLength,
int  timeLoop 
) [protected, virtual]

initializes the fields of a WaveTile.

Parameters:
tex the Texture2D that contains the wave profiles.
gridSize size of the texture.
tileSize size of a tile.
waveLength size of a wave.
timeLoop number of frames of a wave cycle.
virtual void proland::WaveTile::timeStep ( float  dt  )  [virtual]

Updates the Texture depending on the time spent between the two images.

virtual void proland::WaveTile::updateUniform ( ptr< Program >  p  )  [virtual]

Updates the GLSL uniforms.

Reimplemented in proland::AnimatedPerlinWaveTile.


Member Data Documentation

int proland::WaveTile::gridSize [protected]

Size of the texture.

ptr<Program> proland::WaveTile::lastProgram [protected]

Last updated program.

Used to avoid querying again every uniforms.

ptr<Uniform1f> proland::WaveTile::lengthU [protected]

Size of a wave.

string proland::WaveTile::name [protected]

Current wave tile's name.

ptr<Uniform1f> proland::WaveTile::patternTexSizeU [protected]

Size of a wave pattern inside texture.

ptr<UniformSampler> proland::WaveTile::patternTexU [protected]

The sampler containing the texture.

ptr<Texture2D> proland::WaveTile::tex [protected]

The Texture2D that contains the wave profiles.

Reimplemented in proland::AnimatedPerlinWaveTile.

int proland::WaveTile::tileSize [protected]

Size of a tile.

float proland::WaveTile::time [protected]

Current Time in the time cycle.

int proland::WaveTile::timeLoop [protected]

Number of frames of a wave cycle.

ptr<Uniform1f> proland::WaveTile::timeLoopU [protected]

Number of frames of a wave cycle.

ptr<Uniform1f> proland::WaveTile::timeU [protected]

Current Time in the time cycle.

float proland::WaveTile::waveLength [protected]

Size of a wave.


Generated on Sat May 12 09:42:59 2012 for proland by  doxygen 1.6.1