proland::WorldParticleLayer Class Reference
[particles]

A ParticleLayer to manage particles in world space. More...

#include <WorldParticleLayer.h>

Inheritance diagram for proland::WorldParticleLayer:
proland::ParticleLayer

List of all members.

Classes

struct  WorldParticle
 Layer specific particle data for managing particles in world space. More...

Public Member Functions

 WorldParticleLayer (float speedFactor)
 Creates a new WorldParticleLayer.
virtual ~WorldParticleLayer ()
 Deletes this WorldParticleLayer.
float getSpeedFactor () const
 Returns the global scaling factor to be applied to all particle velocities.
void setSpeedFactor (float speedFactor)
 Sets the global scaling factor to be applied to all particle velocities.
bool isPaused () const
 Returns true if this WorldParticleLayer is in paused state.
void setPaused (bool paused)
 Sets the paused state of this WorldParticleLayer.
WorldParticlegetWorldParticle (ParticleStorage::Particle *p)
 Returns the world space specific data of the given particle.
virtual void moveParticles (double dt)
 Moves the particles based on their velocity.

Protected Member Functions

 WorldParticleLayer ()
 Creates an uninitialized WorldParticleLayer.
void init (float speedFactor)
 Initializes this WorldParticleLayer.
virtual void initParticle (ParticleStorage::Particle *p)
 Initializes the world position and velocity of the given particle.

Private Attributes

float speedFactor
 Global scaling factor to be applied to all particle velocities.
bool paused
 If true, particles position won't be updated.

Detailed Description

A ParticleLayer to manage particles in world space.

This class provides particle data to store a position and a velocity for each particle. It updates the positions based on velocities at each frame, but it does not compute the velocities itself. This should be done by another layer.

Authors:
Eric Bruneton, Antoine Begault

Constructor & Destructor Documentation

proland::WorldParticleLayer::WorldParticleLayer ( float  speedFactor  ) 

Creates a new WorldParticleLayer.

Parameters:
speedFactor a global scaling factor to be applied to all particle velocities.
virtual proland::WorldParticleLayer::~WorldParticleLayer (  )  [virtual]

Deletes this WorldParticleLayer.

proland::WorldParticleLayer::WorldParticleLayer (  )  [protected]

Creates an uninitialized WorldParticleLayer.


Member Function Documentation

float proland::WorldParticleLayer::getSpeedFactor (  )  const

Returns the global scaling factor to be applied to all particle velocities.

WorldParticle* proland::WorldParticleLayer::getWorldParticle ( ParticleStorage::Particle p  )  [inline]

Returns the world space specific data of the given particle.

Parameters:
p a particle.
void proland::WorldParticleLayer::init ( float  speedFactor  )  [protected]

Initializes this WorldParticleLayer.

See WorldParticleLayer.

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

Initializes the world position and velocity of the given particle.

Reimplemented from proland::ParticleLayer.

bool proland::WorldParticleLayer::isPaused (  )  const

Returns true if this WorldParticleLayer is in paused state.

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

Moves the particles based on their velocity.

The velocities are not updated. This should be done by another layer.

Reimplemented from proland::ParticleLayer.

void proland::WorldParticleLayer::setPaused ( bool  paused  ) 

Sets the paused state of this WorldParticleLayer.

Parameters:
paused if true, particles position won't be updated.
void proland::WorldParticleLayer::setSpeedFactor ( float  speedFactor  ) 

Sets the global scaling factor to be applied to all particle velocities.


Member Data Documentation

If true, particles position won't be updated.

Global scaling factor to be applied to all particle velocities.


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