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

StraightSolver.cpp

Go to the documentation of this file.
00001 
00006 #include "StraightSolver.h"
00007 #include <algorithm>
00008 using namespace ParticleSystems;
00009 using namespace GraphicsLib;
00010 
00011 StraightSolver::StraightSolver(Force *f) : Solver(f) {
00012 }
00013 
00014 StraightSolver::StraightSolver() : Solver() {
00015 }
00016 
00017 StraightSolver::~StraightSolver() {
00018 }
00019 
00020 
00021 void StraightSolver::nextStep(Vector *direction) {
00022         forcesItt = forces.begin();
00023         while(forcesItt != forces.end()) {
00024                 //Apply the forces to the direction
00025                 (*forcesItt)->applyForce(direction);
00026                 forcesItt++;
00027         }
00028 }
00029 
00030 void StraightSolver::nextStep(Vector *direction, float *mass) {
00031         forcesItt = forces.begin();
00032         while(forcesItt != forces.end()) {
00033                 //Apply the forces to direction incooperating the mass
00034                 (*forcesItt)->applyForce(direction, mass);
00035                 forcesItt++;
00036         }
00037 }
00038 

Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1