nCine 2025.06.r503-ff15d8d
A cross-platform 2D game engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
ncine::RotationAffector Class Reference

Particle rotation affector. More...

#include <ParticleAffectors.h>

Inheritance diagram for ncine::RotationAffector:
Inheritance graph
[legend]
Collaboration diagram for ncine::RotationAffector:
Collaboration graph
[legend]

Classes

struct  RotationStep
 

Public Member Functions

 RotationAffector (RotationAffector &&)=default
 Default move constructor.
 
RotationAffectoroperator= (RotationAffector &&)=default
 Default move assignment operator.
 
RotationAffector clone () const
 Returns a copy of this object.
 
void affect (Particle *particle, float normalizedAge) override
 Affects the rotation of the specified particle.
 
void addRotationStep (float age, float angle)
 
void addRotationStep (const RotationStep &step)
 
unsigned int numSteps () const override
 Returns the number of steps.
 
void removeStep (unsigned int index) override
 Removes the step at the specified position index.
 
void clearSteps () override
 Removes all steps.
 
nctl::Array< RotationStep > & steps ()
 
const nctl::Array< RotationStep > & steps () const
 
- Public Member Functions inherited from ncine::ParticleAffector
 ParticleAffector (Type type)
 
void affect (Particle *particle)
 Affects a property of the specified particle.
 
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.
 

Protected Member Functions

 RotationAffector (const RotationAffector &other)=default
 Protected default copy constructor used to clone objects.
 
- Protected Member Functions inherited from ncine::ParticleAffector
 ParticleAffector (const ParticleAffector &other)=default
 Protected default copy constructor used to clone objects.
 

Additional Inherited Members

- Public Types inherited from ncine::ParticleAffector
enum class  Type {
  COLOR , SIZE , ROTATION , POSITION ,
  VELOCITY
}
 
- Protected Attributes inherited from ncine::ParticleAffector
Type type_
 Affector type.
 
bool enabled_
 A flag indicating whether the affector is enabled or not.
 

Detailed Description

Particle rotation affector.

Member Function Documentation

◆ affect()

void ncine::RotationAffector::affect ( Particle particle,
float  normalizedAge 
)
overridevirtual

Affects the rotation of the specified particle.

Implements ncine::ParticleAffector.

◆ clearSteps()

void ncine::RotationAffector::clearSteps ( )
inlineoverridevirtual

Removes all steps.

Implements ncine::ParticleAffector.

◆ numSteps()

unsigned int ncine::RotationAffector::numSteps ( ) const
inlineoverridevirtual

Returns the number of steps.

Implements ncine::ParticleAffector.

◆ removeStep()

void ncine::RotationAffector::removeStep ( unsigned int  index)
overridevirtual

Removes the step at the specified position index.

Implements ncine::ParticleAffector.


The documentation for this class was generated from the following files: