Molecular Dynamics Simulation
1.0
|
Interface for particle spawner classes. More...
#include <ParticleSpawner.h>
Public Member Functions | |
virtual int | spawnParticles (std::vector< Particle > &particles) const =0 |
Spawns particles in the given container. More... | |
virtual size_t | getEstimatedNumberOfParticles () const =0 |
Estimate the number of particles to be spawned. More... | |
Interface for particle spawner classes.
Definition of an interface for particle spawner classes. This is used to ensure inheriting classes implement the method spawnParticles(ParticleContainer& particle_container) according to our definition.
Definition at line 13 of file ParticleSpawner.h.
|
pure virtual |
Estimate the number of particles to be spawned.
returns the number of particles to be spawned by this spawner this can be used to reserve enought memory in the particle container
Implemented in SphereSpawner, SoftBodyCuboidSpawner, and CuboidSpawner.
|
pure virtual |
Spawns particles in the given container.
particles | A vector of particles to spawn |
Implemented in SphereSpawner, SoftBodyCuboidSpawner, and CuboidSpawner.