proland::TerrainParticleLayer Class Reference
[terrain]

A ParticleLayer to advect particles in world space by using a velocity field defined on one or more terrains. More...

#include <TerrainParticleLayer.h>

Inheritance diagram for proland::TerrainParticleLayer:
proland::ParticleLayer

List of all members.

Classes

struct  TerrainInfo
 Contains a SceneNode and its corresponding TerrainNode. More...
struct  TerrainParticle
 Layer specific particle data for managing particles on terrains. More...

Public Member Functions

 TerrainParticleLayer (map< ptr< TileProducer >, TerrainInfo * > infos)
 Creates a new TerrainParticleLayer.
virtual ~TerrainParticleLayer ()
 Deletes this LifeCycleParticleLayer.
TerrainParticlegetTerrainParticle (ParticleStorage::Particle *p)
 Returns the screen space specific data of the given particle.
virtual void getReferencedProducers (vector< ptr< TileProducer > > &producers) const
 Returns the tile producers used by this ParticleLayer.
virtual void moveParticles (double dt)
 Moves the existing particles.

Protected Member Functions

 TerrainParticleLayer ()
 Creates an uninitialized TerrainParticleLayer.
void init (map< ptr< TileProducer >, TerrainInfo * > infos)
 Initializes this TerrainParticleLayer.
virtual void initialize ()
 Initializes this ParticleLayer.
virtual void initParticle (ParticleStorage::Particle *p)
 Initializes the data that is specific to this layer in the given particle.
ptr< FlowTilefindFlowTile (ptr< TileProducer > producer, TileCache::Tile *t, vec3d &pos)
 Finds the FlowTile from a given TileProducer at given local coordinates.
ptr< FlowTilegetFlowTile (TerrainParticle *t)
 Returns the FlowTile required to compute the velocity of a given TerrainParticle.
ptr< TileProducergetFlowProducer (ParticleStorage::Particle *p)
 Returns the TileProducer associated to the terrain on which a given Particle is.

Protected Attributes

map< ptr< TileProducer >
, TerrainInfo * > 
infos
 Each flow producer mapped to its SceneNode.

Private Attributes

LifeCycleParticleLayerlifeCycleLayer
 The layer managing the life cycle of particles.
ScreenParticleLayerscreenLayer
 The layer managing the particles in screen space.
WorldParticleLayerworldLayer
 The layer managing the particles in world space.

Detailed Description

A ParticleLayer to advect particles in world space by using a velocity field defined on one or more terrains.

This layer requires particles world positions and velocities to be managed by a WorldParticleLayer.

Author:
Antoine Begault, Guillaume Piolat

Constructor & Destructor Documentation

proland::TerrainParticleLayer::TerrainParticleLayer ( map< ptr< TileProducer >, TerrainInfo * >  infos  ) 

Creates a new TerrainParticleLayer.

Parameters:
infos each flow producer mapped to its SceneNode.
virtual proland::TerrainParticleLayer::~TerrainParticleLayer (  )  [virtual]

Deletes this LifeCycleParticleLayer.

proland::TerrainParticleLayer::TerrainParticleLayer (  )  [protected]

Creates an uninitialized TerrainParticleLayer.


Member Function Documentation

ptr<FlowTile> proland::TerrainParticleLayer::findFlowTile ( ptr< TileProducer producer,
TileCache::Tile t,
vec3d &  pos 
) [protected]

Finds the FlowTile from a given TileProducer at given local coordinates.

Parameters:
producer the TileProducer used to create the FlowTiles.
t the last browsed FlowTile.
pos local terrain coordinates for which we need the FlowTile.
ptr<TileProducer> proland::TerrainParticleLayer::getFlowProducer ( ParticleStorage::Particle p  )  [protected]

Returns the TileProducer associated to the terrain on which a given Particle is.

ptr<FlowTile> proland::TerrainParticleLayer::getFlowTile ( TerrainParticle t  )  [protected]

Returns the FlowTile required to compute the velocity of a given TerrainParticle.

virtual void proland::TerrainParticleLayer::getReferencedProducers ( vector< ptr< TileProducer > > &  producers  )  const [virtual]

Returns the tile producers used by this ParticleLayer.

Parameters:
[out] producers the tile producers used by this ParticleLayer.

Reimplemented from proland::ParticleLayer.

TerrainParticle* proland::TerrainParticleLayer::getTerrainParticle ( ParticleStorage::Particle p  )  [inline]

Returns the screen space specific data of the given particle.

Parameters:
p a particle.
void proland::TerrainParticleLayer::init ( map< ptr< TileProducer >, TerrainInfo * >  infos  )  [protected]
virtual void proland::TerrainParticleLayer::initialize (  )  [protected, virtual]

Initializes this ParticleLayer.

If this layer needs reference to other layers it can initialize them in this method (using the template method ParticleProducer::getLayer()). The default implementation of this method does nothing.

Reimplemented from proland::ParticleLayer.

virtual void proland::TerrainParticleLayer::initParticle ( ParticleStorage::Particle p  )  [protected, virtual]

Initializes the data that is specific to this layer in the given particle.

The default implementation of this method does nothing.

Reimplemented from proland::ParticleLayer.

virtual void proland::TerrainParticleLayer::moveParticles ( double  dt  )  [virtual]

Moves the existing particles.

The default implementation of this method does nothing.

Parameters:
dt the elapsed time since the last call to this method, in microseconds.

Reimplemented from proland::ParticleLayer.


Member Data Documentation

Each flow producer mapped to its SceneNode.

The layer managing the life cycle of particles.

The layer managing the particles in screen space.

The layer managing the particles in world space.


Generated on Sat May 12 09:41:37 2012 for proland by  doxygen 1.6.1