5.1.2.1.2 : Summary table_particle.h


Here is the full table_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
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/

#ifndef __TABLE_PARTICLE_H__
#define __TABLE_PARTICLE_H__

#include <iostream>

///@brief Table of particles
struct TableParticle{
	///Number of particles
	size_t nbParticle;
	///Table of the x position of the particles
	float * tabPosX;
	///Table of the y position of the particles
	float * tabPosY;
	///Table of the z position of the particles
	float * tabPosZ;
	
	///Table of the x velocity of the particles
	float * tabVitX;
	///Table of the y velocity of the particles
	float * tabVitY;
	///Table of the z velocity of the particles
	float * tabVitZ;
	
	///Table of the x acceleration of the particles
	float * tabAccX;
	///Table of the y acceleration of the particles
	float * tabAccY;
	///Table of the z acceleration of the particles
	float * tabAccZ;
};

void allocTableParticle(TableParticle & tp, size_t nbParticle);

void initTableParticle(TableParticle & tp);

void freeTableParticle(TableParticle & tp);

void moveParticle(TableParticle & tp, float dt);

#endif


You can download it here.