Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Helper class used to provide a function as a particle generator without going in the process of making a new class. More...
Public Types | |
using | Generator = std::function< void(ParticleGroup &, ParticleMapper &, unsigned int, unsigned int)> |
Public Member Functions | |
ParticleFunctionGenerator (Generator controller) | |
ParticleFunctionGenerator (const ParticleFunctionGenerator &)=default | |
void | Generate (ParticleGroup &group, ParticleMapper &mapper, unsigned int startId, unsigned int endId) override final |
Calls the generator function. More... | |
const Generator & | GetGenerator () const |
Gets the generator function. More... | |
void | SetGenerator (Generator generator) |
Sets the generator function. More... | |
Public Member Functions inherited from Nz::ParticleGenerator | |
ParticleGenerator (const ParticleGenerator &generator) | |
Constructs a ParticleGenerator object by assignation. More... | |
virtual | ~ParticleGenerator () |
Destructs the object and calls OnParticleGeneratorRelease. More... | |
NazaraSignal (OnParticleGeneratorRelease, const ParticleGenerator *) | |
Public Member Functions inherited from Nz::RefCounted | |
RefCounted (bool persistent=true) | |
Constructs a RefCounted object with a persistance aspect. More... | |
RefCounted (const RefCounted &)=delete | |
RefCounted (RefCounted &&)=default | |
virtual | ~RefCounted () |
Destructs the object. More... | |
void | AddReference () const |
Adds a reference to the object. | |
unsigned int | GetReferenceCount () const |
Gets the number of references to the object. More... | |
bool | IsPersistent () const |
Checks whether the object is persistent. More... | |
bool | RemoveReference () const |
Removes a reference to the object. More... | |
bool | SetPersistent (bool persistent=true, bool checkReferenceCount=false) |
Sets the persistence of the object. More... | |
RefCounted & | operator= (const RefCounted &)=delete |
RefCounted & | operator= (RefCounted &&)=default |
Static Public Member Functions | |
template<typename... Args> | |
static ParticleFunctionGeneratorRef | New (Args &&... args) |
Helper class used to provide a function as a particle generator without going in the process of making a new class.
|
finaloverridevirtual |
Calls the generator function.
group | Particle group responsible of the particles |
mapper | Particle mapper, allowing access to the particle data |
startId | The first ID of the particle to update (inclusive) |
endId | The last ID of the particle to update (inclusive) |
Implements Nz::ParticleGenerator.
|
inline |
Gets the generator function.
|
inline |
Sets the generator function.