Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IParticleAffector.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_PARTICLE_AFFECTOR_HPP_INCLUDED
6#define NIRT_I_PARTICLE_AFFECTOR_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IAttributeExchangingObject.hpp>
9#include <nirtcpp/core/engine/SParticle.hpp>
10
11namespace nirt
12{
13namespace scene
14{
15
18{
19 EPAT_NONE = 0,
20 EPAT_ATTRACT,
21 EPAT_FADE_OUT,
22 EPAT_GRAVITY,
23 EPAT_ROTATE,
24 EPAT_SCALE,
25 EPAT_COUNT
26};
27
30{
31 "None",
32 "Attract",
33 "FadeOut",
34 "Gravity",
35 "Rotate",
36 "Scale",
37 0
38};
39
42{
43public:
44
46 IParticleAffector() : Enabled(true) {}
47
49
52 virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
53
55 virtual void setEnabled(bool enabled) { Enabled = enabled; }
56
58 virtual bool getEnabled() const { return Enabled; }
59
61 virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
62
63protected:
64 bool Enabled;
65};
66
67} // end namespace scene
68} // end namespace nirt
69
70#endif
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.hpp:54
A particle affector modifies particles.
Definition IParticleAffector.hpp:42
virtual void affect(u32 now, SParticle *particlearray, u32 count)=0
Affects an array of particles.
IParticleAffector()
constructor
Definition IParticleAffector.hpp:46
virtual void setEnabled(bool enabled)
Sets whether or not the affector is currently enabled.
Definition IParticleAffector.hpp:55
virtual E_PARTICLE_AFFECTOR_TYPE getType() const =0
Get emitter type.
virtual bool getEnabled() const
Gets whether or not the affector is currently enabled.
Definition IParticleAffector.hpp:58
Class for holding particle data.
Definition SParticle.hpp:18
E_PARTICLE_AFFECTOR_TYPE
Types of built in particle affectors.
Definition IParticleAffector.hpp:18
const c8 *const ParticleAffectorTypeNames[]
Names for built in particle affectors.
Definition IParticleAffector.hpp:29
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
char c8
8 bit character variable.
Definition irrTypes.hpp:37

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print