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
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
00034 (*forcesItt)->applyForce(direction, mass);
00035 forcesItt++;
00036 }
00037 }
00038