-
Notifications
You must be signed in to change notification settings - Fork 0
/
Swarm.hpp
50 lines (41 loc) · 945 Bytes
/
Swarm.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Particle simulation program using the SDL library
* Based on examples by John Purcell's (from Cave of Programming)
*
* @author J. Alvarez
*/
#ifndef SWARM_HPP
#define SWARM_HPP
#include "Particle.hpp"
namespace ParticleSimulation {
class Swarm {
public:
const static int N_PARTICLES = 4222;
enum TYPE {RECT, POLAR};
private:
Particle * * m_particles;
int m_type;
int m_lastUpdate;
public:
/**
* Creates a Swarm instance based on a specified type and Particles mode
* @param type The Swarm type
* @param mode The Particles type
*/
Swarm(int type, int rectMode);
/**
* Destructor method that ensures to delete the Swarm's Particles structure
*/
~Swarm();
/**
* @return The Particles structure
*/
Particle * * getParticles();
/**
* Updates all the Swarm's Particles
* @param elapsed Time of Screen rendering
*/
void update(int elapsed);
};
} // namespace ParticleSimulation
#endif // SWARM_HPP