|
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 6 of file particles.cpp.
| std::vector< Particle >::const_iterator Particles::begin | ( | ) | const |
Definition at line 10 of file particles.cpp.
| std::vector< Particle >::iterator Particles::end | ( | ) |
Definition at line 14 of file particles.cpp.
| std::vector< Particle >::const_iterator Particles::end | ( | ) | const |
Definition at line 18 of file particles.cpp.
| int Particles::size | ( | ) | const |
Get the number of particles.
Definition at line 22 of file particles.cpp.

| void Particles::add | ( | const Particle & | particle | ) |
Add a particle to the collection.
| particle | the particle to add |
Definition at line 26 of file particles.cpp.

| Particle & Particles::operator[] | ( | size_t | index | ) |
Get a particle by index.
| index | the index of the particle |
Definition at line 33 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 37 of file particles.cpp.
|
private |
Definition at line 49 of file particles.hpp.