I don't think your design is the best idea. Consider what happens when you have a high number of particles. Each particles holds a vector of pointers to particals, when you add one more particle to the system, you will need to run through all particles to figure out which particles are neighbours and then update each appropriate neighbour vector.
Furthermore, you are not currently considering particle momentum, which you will need to do for a proper simulation. In this case, everytime you move to the next time frame, you will need to recalculate which particles each particle considers its neighbours. For a high number of particles your simulation computation time will increase significantly past a linear increase.
It would perhaps be a better design if you had a container of particles.
Code:
std::vector<particle> particles_
Where from a data model point of view Particle is defined as follows
Code:
struct particle
{
Location loc;
Momenta m;
};
and Location is defined as
Code:
struct location
{
int x;
int y;
int z;
};
and momenta is defined as:
Code:
struct momenta
{
double mass;
float p_x;
float p_y;
float p_z;
};
Note that particle physics uses four-momenta:
http://en.wikipedia.org/wiki/Four-momentum
However, since you are not dealing with relativistic calculations, it makes more sense in your case to use the particle rest mass. You can then calculate velocities as
Code:
v_x = p_x/m;
v_y = p_y/m;
v_z = p_z/m;
Anyway, effectively if you do the above, then your vector of particles will be a snapshot in time. You will be able to use the momenta and location of each particle to make efficient elastic collision calculations with neighbouring particles using discrete changes in time. You will also be able to make particle tracks.
I'm not sure if this is more than you want, but anyway, that's for you to decide.