|
nCine 2025.10.r509-70a8df8
A cross-platform 2D game engine
|
Base class for particle affectors. More...
#include <ParticleAffectors.h>

Public Types | |
| enum class | Type { COLOR , SIZE , ROTATION , POSITION , VELOCITY } |
Public Member Functions | |
| ParticleAffector (Type type) | |
| void | affect (Particle *particle) |
| Affects a property of the specified particle. | |
| virtual void | affect (Particle *particle, float normalizedAge)=0 |
| Affects a property of the specified particle, without calculating the normalized age. | |
| Type | type () const |
| Returns the affector type. | |
| bool | isEnabled () const |
| Returns true if the affector is enabled. | |
| void | setEnabled (bool enabled) |
| Enables or disables the affector. | |
| virtual unsigned int | numSteps () const =0 |
| Returns the number of steps. | |
| virtual void | removeStep (unsigned int index)=0 |
| Removes the step at the specified position index. | |
| virtual void | clearSteps ()=0 |
| Removes all steps. | |
Protected Member Functions | |
| ParticleAffector (const ParticleAffector &other)=default | |
| Protected default copy constructor used to clone objects. | |
Protected Attributes | |
| Type | type_ |
| Affector type. | |
| bool | enabled_ |
| A flag indicating whether the affector is enabled or not. | |
Base class for particle affectors.
Affectors modify particle properties depending on their remaining life
|
pure virtual |
Affects a property of the specified particle, without calculating the normalized age.
Implemented in ncine::ColorAffector, ncine::SizeAffector, ncine::RotationAffector, ncine::PositionAffector, and ncine::VelocityAffector.
|
pure virtual |
Removes all steps.
Implemented in ncine::ColorAffector, ncine::SizeAffector, ncine::RotationAffector, ncine::PositionAffector, and ncine::VelocityAffector.
|
pure virtual |
Returns the number of steps.
Implemented in ncine::ColorAffector, ncine::SizeAffector, ncine::RotationAffector, ncine::PositionAffector, and ncine::VelocityAffector.
|
pure virtual |
Removes the step at the specified position index.
Implemented in ncine::ColorAffector, ncine::SizeAffector, ncine::RotationAffector, ncine::PositionAffector, and ncine::VelocityAffector.