Cyclone Cyclone: cyclone::ParticleForceRegistry Class Reference

cyclone::ParticleForceRegistry Class Reference

Holds all the force generators and the particles they apply to. More...

#include <pfgen.h>

List of all members.

Public Member Functions

void add (Particle *particle, ParticleForceGenerator *fg)
 Registers the given force generator to apply to the given particle.
void remove (Particle *particle, ParticleForceGenerator *fg)
 Removes the given registered pair from the registry.
void clear ()
 Clears all registrations from the registry.
void updateForces (real duration)
 Calls all the force generators to update the forces of their corresponding particles.

Protected Types

typedef std::vector< ParticleForceRegistrationRegistry
 Holds the list of registrations.

Protected Attributes

Registry registrations

Classes

struct  ParticleForceRegistration
 Keeps track of one force generator and the particle it applies to. More...


Detailed Description

Holds all the force generators and the particles they apply to.


Member Typedef Documentation

typedef std::vector<ParticleForceRegistration> cyclone::ParticleForceRegistry::Registry [protected]
 

Holds the list of registrations.


Member Function Documentation

void cyclone::ParticleForceRegistry::add Particle particle,
ParticleForceGenerator fg
 

Registers the given force generator to apply to the given particle.

void cyclone::ParticleForceRegistry::clear  ) 
 

Clears all registrations from the registry.

This will not delete the particles or the force generators themselves, just the records of their connection.

void cyclone::ParticleForceRegistry::remove Particle particle,
ParticleForceGenerator fg
 

Removes the given registered pair from the registry.

If the pair is not registered, this method will have no effect.

void cyclone::ParticleForceRegistry::updateForces real  duration  ) 
 

Calls all the force generators to update the forces of their corresponding particles.


Member Data Documentation

Registry cyclone::ParticleForceRegistry::registrations [protected]
 


The documentation for this class was generated from the following file: