nCine::ParticleAffector class

Base class for particle affectors.

Affectors modify particle properties depending on their remaining life

Derived classes

class ColorAffector
Particle color affector.
class PositionAffector
Particle position affector.
class RotationAffector
Particle rotation affector.
class SizeAffector
Particle size affector.
class VelocityAffector
Particle velocity affector.

Public types

enum class Type { COLOR, SIZE, ROTATION, POSITION, VELOCITY }

Constructors, destructors, conversion operators

ParticleAffector(Type type)
~ParticleAffector() virtual
ParticleAffector(const ParticleAffector& other) protected defaulted
Protected default copy constructor used to clone objects.

Public functions

void affect(Particle* particle)
Affects a property of the specified particle.
void affect(Particle* particle, float normalizedAge) pure virtual
Affects a property of the specified particle, without calculating the normalized age.
auto type() const -> Type
Returns the object type (RTTI)

Protected variables

Type type_
Affector type.