proland::UpdateRiversTask Class Reference
[rivers]

This class is used to draw multi-resolution Animated Rivers as described in Qizhi Yu's Thesis [Models of Animated Rivers for the Interactive Exploration of Landscapes - November 2008]. More...

#include <UpdateRiversTask.h>

List of all members.

Classes

struct  TerrainInfo
 Information about a terrainNode, such as the corresponding particleProducer, elevation cache, display informations etc. More...
struct  TileInfo
 Information about a Tile, such as the terrain it belongs to, its coordinates etc. More...

Public Member Functions

 UpdateRiversTask (ptr< ParticleProducer > particles, float timeStep=1.0f)
 Creates a new UpdateRiversTask.
virtual ~UpdateRiversTask ()
 Deletes this UpdateRiversTask.
virtual ptr< Task > getTask (ptr< Object > context)
 Returns the task(s) to be executed for this object.

Protected Member Functions

 UpdateRiversTask ()
 Creates a new UpdateRiversTask.
void init (ptr< ParticleProducer > particles, float timeStep=1.0f)
 Initializes UpdateRiversTask fields.

Private Types

typedef map
< TileCache::Tile::TId,
TileInfo * > 
TileInfos
 See tileInfos.

Private Member Functions

void getTilesToUpdate (TerrainInfo &terrain, ptr< TerrainQuad > q)
 Adds the list of tiles that should be produced to tileInfos.
void updateRivers ()
 Main method called for updating rivers.
void putTiles ()
 Releases the unused tiles.

Private Attributes

ptr< ParticleProducer > particles
 A ParticleProducer.
ptr< TerrainParticleLayer > terrainLayer
 A TerrainParticleLayer.
float timeStep
 Time step at each frame.
vector< TerrainInfoterrainInfos
 List of terrain for which we want to draw Roads.
vector< TileCache::Tile::TId > usedTiles
 Maps a TerrainInfo and a Tile Id to a TileInfo.
TileInfos tileInfos
 Currently visible TileInfos, for each Terrain.
TileInfos previousFrameTiles
 Previous frame visible TileInfos, for each Terrain.
bool initialized
 Determines whether we need to recover the list of terrains associated to this Task.

Detailed Description

This class is used to draw multi-resolution Animated Rivers as described in Qizhi Yu's Thesis [Models of Animated Rivers for the Interactive Exploration of Landscapes - November 2008].

See http://www-evasion.imag.fr/Membres/Qizhi.Yu/phd/ for more details about this work. It represents Rivers on 3 different scales :

Author:
Antoine Begault

Member Typedef Documentation

typedef map<TileCache::Tile::TId, TileInfo*> proland::UpdateRiversTask::TileInfos [private]

See tileInfos.


Constructor & Destructor Documentation

proland::UpdateRiversTask::UpdateRiversTask ( ptr< ParticleProducer >  particles,
float  timeStep = 1.0f 
)

Creates a new UpdateRiversTask.

Parameters:
particles a ParticleProducer.
timeStep time step at each frame. Changes the speed of the river.
virtual proland::UpdateRiversTask::~UpdateRiversTask (  )  [virtual]

Deletes this UpdateRiversTask.

proland::UpdateRiversTask::UpdateRiversTask (  )  [protected]

Creates a new UpdateRiversTask.


Member Function Documentation

virtual ptr<Task> proland::UpdateRiversTask::getTask ( ptr< Object >  context  )  [virtual]

Returns the task(s) to be executed for this object.

It checks which tiles ParticleProducer needs to produce, depending on the current view, and puts it in the returned TaskGraph. The corresponding ParticleManagers will be produced before the run() method call.

Parameters:
context see Method.
void proland::UpdateRiversTask::getTilesToUpdate ( TerrainInfo terrain,
ptr< TerrainQuad >  q 
) [private]

Adds the list of tiles that should be produced to tileInfos.

These tiles correspond to the visible leaf-tiles.

void proland::UpdateRiversTask::init ( ptr< ParticleProducer >  particles,
float  timeStep = 1.0f 
) [protected]

Initializes UpdateRiversTask fields.

Parameters:
particles a ParticleProducer.
timeStep time step at each frame. Changes the speed of the river.
void proland::UpdateRiversTask::putTiles (  )  [private]

Releases the unused tiles.

void proland::UpdateRiversTask::updateRivers (  )  [private]

Main method called for updating rivers.

Calls the ParticleManager::compute() & ParticleManager::MoveParticles() methods.


Member Data Documentation

Determines whether we need to recover the list of terrains associated to this Task.

ptr<ParticleProducer> proland::UpdateRiversTask::particles [private]

A ParticleProducer.

Previous frame visible TileInfos, for each Terrain.

See tileInfos.

List of terrain for which we want to draw Roads.

Will contain every terrain from the parent Node whose name start with terrain's value.

ptr<TerrainParticleLayer> proland::UpdateRiversTask::terrainLayer [private]

A TerrainParticleLayer.

Currently visible TileInfos, for each Terrain.

This is used to determine which tiles should be released when displaying a new frame, if the camera moved.

Time step at each frame.

Changes the speed of the river.

vector<TileCache::Tile::TId> proland::UpdateRiversTask::usedTiles [private]

Maps a TerrainInfo and a Tile Id to a TileInfo.


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