Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ParticleSystems::Solver Class Reference

The Solver Class. More...

#include <Solver.h>

Inheritance diagram for ParticleSystems::Solver:

ParticleSystems::StraightSolver List of all members.

Public Member Functions

 Solver (Force *f)
 The Constructor.
 Solver ()
 The default Constructor.
virtual ~Solver ()
 The Destructor.
void addForce (Force *f)
 A public Function.
void removeForce (Force *f)
 A public Function.
void listForces ()
 A public Function.
virtual void nextStep (GraphicsLib::Vector *direction)=0
 An abstract Function.
virtual void nextStep (GraphicsLib::Vector *direction, float *mass)=0
 An abstract Function.

Public Attributes

std::vector< Force * > forces
 A public variable.
std::vector< Force * >::iterator forcesItt
 A public variable.
int duration
 A public variable.

Detailed Description

The Solver Class.

The Solver Class main functionality is to evolve a Particles direction accoriding to its specified rules. The Solver Class is the Super Class and all the inheriting classes need to implement the abstract methods. A Solver updates the particle movement using the given forces.

Author:
Hannes Ricklefs

Definition at line 31 of file Solver.h.


Constructor & Destructor Documentation

Solver::Solver Force f  ) 
 

The Constructor.

The Constructor which adds the given Force to the forces vector.

Parameters:
f a pointer to the Force

Definition at line 12 of file Solver.cpp.

References forces.

Solver::Solver  ) 
 

The default Constructor.

The default Constructor

Definition at line 16 of file Solver.cpp.

Solver::~Solver  )  [virtual]
 

The Destructor.

The Destructor

Definition at line 19 of file Solver.cpp.


Member Function Documentation

void Solver::addForce Force f  ) 
 

A public Function.

Adds a Force to this Solver to affect the Particle

Parameters:
f a pointer to the Force to be added

Definition at line 31 of file Solver.cpp.

References forces.

Referenced by fire(), multiCollision(), and smoke().

void Solver::listForces  ) 
 

A public Function.

Prints all the Forces to stdout.

Definition at line 22 of file Solver.cpp.

References forces, and forcesItt.

virtual void ParticleSystems::Solver::nextStep GraphicsLib::Vector *  direction,
float *  mass
[pure virtual]
 

An abstract Function.

Evolves the given direction Vector by applying the Forces assigned to this Solver. This function also takes into consideration the mass passed.

Parameters:
direction a pointer to the direction Vector to change
mass the mass of the Particle

Implemented in ParticleSystems::StraightSolver.

virtual void ParticleSystems::Solver::nextStep GraphicsLib::Vector *  direction  )  [pure virtual]
 

An abstract Function.

Evolves the given direction Vector by applying the Forces assigned to this Solver.

Parameters:
direction a pointer to the direction Vector to change

Implemented in ParticleSystems::StraightSolver.

Referenced by ParticleSystems::StrikeParticle::update(), ParticleSystems::PointParticle::update(), and ParticleSystems::ImgParticle::update().

void Solver::removeForce Force f  ) 
 

A public Function.

Removes a Force from this Solver

Parameters:
f a pointer to the Force to be removed

Definition at line 37 of file Solver.cpp.

References forces, and forcesItt.


Member Data Documentation

int ParticleSystems::Solver::duration
 

A public variable.

The duration of this Solver

Definition at line 109 of file Solver.h.

std::vector<Force *> ParticleSystems::Solver::forces
 

A public variable.

The Force affecting the Particle movement.

Definition at line 97 of file Solver.h.

Referenced by addForce(), listForces(), removeForce(), and Solver().

std::vector<Force *>::iterator ParticleSystems::Solver::forcesItt
 

A public variable.

An Itterator for the Forces

Definition at line 103 of file Solver.h.

Referenced by listForces(), and removeForce().


The documentation for this class was generated from the following files:
Generated on Thu Mar 24 11:05:03 2005 for ParticleSystem by  doxygen 1.4.1