Space Comps
 All Classes Files Functions Variables
sweepnprunealgorithmsimple.h
1 #ifndef SWEEPNPRUNEALGORITHM_H
2 #define SWEEPNPRUNEALGORITHM_H
3 #include <math.h>
4 #include "algorithm.h"
5 #include "boundingbox.h"
6 
21 {
22 public:
34  SweepNPruneAlgorithmSimple(int xIn, int yIn, int numParticles);
35 
48  SweepNPruneAlgorithmSimple(int xIn, int yIn, int zIn, int numParticles);
49 
64  SweepNPruneAlgorithmSimple(int xIn, int yIn, int zIn, double massIn, int numParticles);
65 
67 
68 private:
69  void calculateNextTimestep();
70 
71  std::vector<BoundingBox*> boundingBoxes;
72  void insertionSort(std::vector<BoundingBox*> &boxes, int dimension);
73 };
74 
75 #endif // SWEEPNPRUNEALGORITHM_H
76 
The Algorithm class is a parent to all the specific Algorithms we test.
Definition: algorithm.h:16
The SweepNPruneAlgorithmSimple class executes the sweep and prune method of collision detection...
Definition: sweepnprunealgorithmsimple.h:20
SweepNPruneAlgorithmSimple(int xIn, int yIn, int numParticles)
Constructs a 2d SweepNPruneAlgorithmSimple.
Definition: sweepnprunealgorithmsimple.cpp:3