nCine::SizeAffector class

Particle size affector.

Base classes

class ParticleAffector
Base class for particle affectors.

Public types

struct SizeStep

Constructors, destructors, conversion operators

SizeAffector()
Constructs a size affector with a default base scale factor.
SizeAffector(float baseScale) explicit
Constructs a size affector with a base scale factor as a reference.
SizeAffector(float baseScaleX, float baseScaleY)
Constructs a size affector with a horizontal and a vertical base scale factor as a reference.
SizeAffector(Vector2f baseScale) explicit
Constructs a size affector with a vector base scale factor as a reference.
SizeAffector(SizeAffector&&) defaulted
Default move constructor.
SizeAffector(const SizeAffector& other) protected defaulted
Protected default copy constructor used to clone objects.

Public functions

auto operator=(SizeAffector&&) -> SizeAffector& defaulted
Default move assignment operator.
auto clone() const -> SizeAffector
Returns a copy of this object.
void affect(Particle* particle, float normalizedAge) override
Affects the size of the specified particle.
void addSizeStep(float age, float scale)
void addSizeStep(float age, float scaleX, float scaleY)
void addSizeStep(float age, Vector2f scale)
auto steps() -> SmallVectorImpl<SizeStep>&
auto steps() const -> const SmallVectorImpl<SizeStep>&
auto baseScaleX() const -> float
void setBaseScaleX(float baseScaleX)
auto baseScaleY() const -> float
void setBaseScaleY(float baseScaleY)
auto baseScale() const -> Vector2f
void setBaseScale(float baseScale)
void setBaseScale(Vector2f baseScale)