5.1.1.2.2 : Summary Particle.h


Here is the full Particle.h file :

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
51
52
53
54
55
56
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/

#ifndef __PARTICLE_H__
#define __PARTICLE_H__

#include "asterics_random.h"
#include "PAbstractVect3.h"

///Vector of float
typedef PAbstractVect3<float> Vec3f;

///@brief Description of the Particle
class Particle{
	public:
		Particle();
		Particle(const Particle & other);
		virtual ~Particle();
		Particle & operator = (const Particle & other);
		
		void randomInit();
		
		void move(float dt);
		
		void setPosition(const Vec3f & position);
		void setVelocity(const Vec3f & velocity);
		void setAcceleration(const Vec3f & acceleration);
		
		const Vec3f & getPosition() const;
		Vec3f & getPosition();
		
		const Vec3f & getVelocity() const;
		Vec3f & getVelocity();
		
		const Vec3f & getAcceleration() const;
		Vec3f & getAcceleration();
		
	protected:
		void copyParticle(const Particle & other);
		
	private:
		void initialisationParticle();
		///Position of the particle
		Vec3f p_position;
		///Velocity of the particle
		Vec3f p_velocity;
		///Acceleration of the particle
		Vec3f p_acceleration;
};



#endif


You can download it here.