MPS-Basic
|
A collection of particles. More...
#include <particles.hpp>
Public Member Functions | |
std::vector< Particle >::iterator | begin () |
std::vector< Particle >::const_iterator | begin () const |
std::vector< Particle >::iterator | end () |
std::vector< Particle >::const_iterator | end () const |
int | size () const |
Get the number of particles. | |
void | add (const Particle &particle) |
Add a particle to the collection. | |
Particle & | operator[] (size_t index) |
Get a particle by index. | |
const Particle & | operator[] (size_t index) const |
Get a particle by index. | |
Private Attributes | |
std::vector< Particle > | particles |
A collection of particles.
Definition at line 10 of file particles.hpp.
std::vector< Particle >::iterator Particles::begin | ( | ) |
Definition at line 5 of file particles.cpp.
std::vector< Particle >::const_iterator Particles::begin | ( | ) | const |
Definition at line 9 of file particles.cpp.
std::vector< Particle >::iterator Particles::end | ( | ) |
Definition at line 13 of file particles.cpp.
std::vector< Particle >::const_iterator Particles::end | ( | ) | const |
Definition at line 17 of file particles.cpp.
int Particles::size | ( | ) | const |
Get the number of particles.
Definition at line 21 of file particles.cpp.
void Particles::add | ( | const Particle & | particle | ) |
Add a particle to the collection.
particle | the particle to add |
Definition at line 25 of file particles.cpp.
Particle & Particles::operator[] | ( | size_t | index | ) |
Get a particle by index.
index | the index of the particle |
Definition at line 32 of file particles.cpp.
const Particle & Particles::operator[] | ( | size_t | index | ) | const |
Get a particle by index.
index | the index of the particle |
Definition at line 36 of file particles.cpp.
|
private |
Definition at line 49 of file particles.hpp.