proland::HydroFlowProducer Class Reference
[rivers]

Produces the required HydroFlowData for a given tile at a given level. More...

#include <HydroFlowProducer.h>

List of all members.

Classes

class  RiverMargin
 A Margin adapted for river graphs. More...

Public Member Functions

 HydroFlowProducer (ptr< GraphProducer > graphs, ptr< TileCache > cache, int displayTileSize, float slipParameter, float searchRadiusFactor, float potentialDelta, int minLevel)
 Creates a new HydroFlowProducer.
virtual ~HydroFlowProducer ()
 Deletes this HydroFlowProducer.
ptr< GraphProducer > getGraphProducer ()
 Returns the GraphProducer used by this HydroFlowProducer.
int getTileSize ()
 Returns the displayed tile size.
float getSlipParameter ()
 Returns the slip parameter.
void setSlipParameter (float slip)
 Changes the slip parameter.
float getPotentialDelta ()
 Returns the potential delta parameter.
void setPotentialDelta (float delta)
 Changes the potential delta parameter.
void addUsedTiles (int level, int tx, int ty, TileProducer *producer, set< TileCache::Tile * > tiles)
 Adds a list of tiles used by each tile of this layer.

Protected Member Functions

 HydroFlowProducer ()
 Creates a new HydroFlowProducer.
void init (ptr< GraphProducer > graphs, ptr< TileCache > cache, int displayTileSize, float slipParameter, float searchRadiusFactor, float potentialDelta, int minLevel)
 Initializes HydroFlowProducer fields.

Private Attributes

ptr< GraphProducer > graphs
 The GraphProducer used to create Graphs.
int displayTileSize
 Size of a displayed tile.
float slipParameter
 Determines slip conditions.
float searchRadiusFactor
 Determines the radius of a DistCell coverage.
float potentialDelta
 Radius used for potential computation.
map< TileCache::Tile::Id, pair
< TileProducer *, set
< TileCache::Tile * > > > 
usedTiles
 The tiles currently in use.
int minLevel
 Minimum level to start creating tiles.

Detailed Description

Produces the required HydroFlowData for a given tile at a given level.

Uses Graphs from a GraphProducer to create curves contained in a HydroFlowData. It then stores them as a simplified version in another graph. The simplified version only contains the visible curves (larger than 1 pixel) from a Graph.

Author:
Antoine Begault, Guillaume Piolat

Constructor & Destructor Documentation

proland::HydroFlowProducer::HydroFlowProducer ( ptr< GraphProducer >  graphs,
ptr< TileCache >  cache,
int  displayTileSize,
float  slipParameter,
float  searchRadiusFactor,
float  potentialDelta,
int  minLevel 
)

Creates a new HydroFlowProducer.

Parameters:
graphs the GraphProducer used to create Graphs.
cache the tile cache that stores the tiles produced by this producer.
displayTileSize size of a displayed tile. Determines which curves will be added to the HydroFlowData (only those whose width is larger than 1 pixel will be taken into account).
slipParameter determines slip conditions.
searchRadiusFactor determines the radius of a DistCell coverage.
potentialDelta radius used for potential computation.
minLevel minimum level to start creating tiles.
virtual proland::HydroFlowProducer::~HydroFlowProducer (  )  [virtual]

Deletes this HydroFlowProducer.

proland::HydroFlowProducer::HydroFlowProducer (  )  [protected]

Creates a new HydroFlowProducer.


Member Function Documentation

void proland::HydroFlowProducer::addUsedTiles ( int  level,
int  tx,
int  ty,
TileProducer *  producer,
set< TileCache::Tile * >  tiles 
)

Adds a list of tiles used by each tile of this layer.

They will require a call to TileProducer::put() when the task has been done.

Parameters:
level the level of the tile.
tx x coordinate of the tile.
ty y coordinate of the tile.
producer the Producer from which the Tiles were produced.
tiles the used tiles that will need to be released.
ptr<GraphProducer> proland::HydroFlowProducer::getGraphProducer (  ) 

Returns the GraphProducer used by this HydroFlowProducer.

float proland::HydroFlowProducer::getPotentialDelta (  ) 

Returns the potential delta parameter.

float proland::HydroFlowProducer::getSlipParameter (  ) 

Returns the slip parameter.

int proland::HydroFlowProducer::getTileSize (  ) 

Returns the displayed tile size.

This is equivalent to the size displayed in ortho layer.

void proland::HydroFlowProducer::init ( ptr< GraphProducer >  graphs,
ptr< TileCache >  cache,
int  displayTileSize,
float  slipParameter,
float  searchRadiusFactor,
float  potentialDelta,
int  minLevel 
) [protected]

Initializes HydroFlowProducer fields.

See HydroFlowProducer.

void proland::HydroFlowProducer::setPotentialDelta ( float  delta  ) 

Changes the potential delta parameter.

void proland::HydroFlowProducer::setSlipParameter ( float  slip  ) 

Changes the slip parameter.


Member Data Documentation

Size of a displayed tile.

Determines which curves will be added to the HydroFlowData (only those whose width is larger than 1 pixel will be taken into account).

ptr<GraphProducer> proland::HydroFlowProducer::graphs [private]

The GraphProducer used to create Graphs.

Minimum level to start creating tiles.

Radius used for potential computation.

Determines the radius of a DistCell coverage.

Determines slip conditions.

map<TileCache::Tile::Id, pair<TileProducer *, set<TileCache::Tile*> > > proland::HydroFlowProducer::usedTiles [private]

The tiles currently in use.

These tiles cannot be evicted from the cache and from the TileStorage, until they become unused. Maps tile identifiers to used tiles and to the TileProducer that produces those tiles.


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