Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IParticleEmitter.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_EMITTER_HPP_INCLUDED
6#define NIRT_I_PARTICLE_EMITTER_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 EPET_POINT = 0,
20 EPET_ANIMATED_MESH,
21 EPET_BOX,
22 EPET_CYLINDER,
23 EPET_MESH,
24 EPET_RING,
25 EPET_SPHERE,
26 EPET_COUNT
27};
28
31{
32 "Point",
33 "AnimatedMesh",
34 "Box",
35 "Cylinder",
36 "Mesh",
37 "Ring",
38 "Sphere",
39 0
40};
41
43
46{
47public:
48
50
55 virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0;
56
58 virtual void setDirection( const core::vector3df& newDirection ) = 0;
59
61 virtual void setMinParticlesPerSecond( u32 minPPS ) = 0;
62
64 virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0;
65
67 virtual void setMinStartColor( const video::SColor& color ) = 0;
68
70 virtual void setMaxStartColor( const video::SColor& color ) = 0;
71
73 virtual void setMaxStartSize( const core::dimension2df& size ) = 0;
74
76 virtual void setMinStartSize( const core::dimension2df& size ) = 0;
77
79 virtual void setMinLifeTime( u32 lifeTimeMin ) = 0;
80
82 virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
83
85 virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
86
88 virtual const core::vector3df& getDirection() const = 0;
89
91 virtual u32 getMinParticlesPerSecond() const = 0;
92
94 virtual u32 getMaxParticlesPerSecond() const = 0;
95
97 virtual const video::SColor& getMinStartColor() const = 0;
98
100 virtual const video::SColor& getMaxStartColor() const = 0;
101
103 virtual const core::dimension2df& getMaxStartSize() const = 0;
104
106 virtual const core::dimension2df& getMinStartSize() const = 0;
107
109 virtual u32 getMinLifeTime() const = 0;
110
112 virtual u32 getMaxLifeTime() const = 0;
113
115 virtual s32 getMaxAngleDegrees() const = 0;
116
118 virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
119};
120
121using IParticlePointEmitter = IParticleEmitter;
122
123} // end namespace scene
124} // end namespace nirt
125
126#endif
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.hpp:54
A particle emitter for using with particle systems.
Definition IParticleEmitter.hpp:46
virtual s32 getMaxAngleDegrees() const =0
Get maximal random derivation from the direction.
virtual const core::dimension2df & getMaxStartSize() const =0
Get the maximum starting size for particles.
virtual void setMinStartColor(const video::SColor &color)=0
Set minimum starting color for particles.
virtual void setMaxAngleDegrees(s32 maxAngleDegrees)=0
Set maximal random derivation from the direction.
virtual void setMaxStartSize(const core::dimension2df &size)=0
Set the maximum starting size for particles.
virtual const core::dimension2df & getMinStartSize() const =0
Get the minimum starting size for particles.
virtual void setMaxParticlesPerSecond(u32 maxPPS)=0
Set maximum number of particles the emitter emits per second.
virtual const video::SColor & getMinStartColor() const =0
Get the minimum starting color for particles.
virtual void setMinStartSize(const core::dimension2df &size)=0
Set the minimum starting size for particles.
virtual u32 getMinLifeTime() const =0
Get the minimum particle life-time in milliseconds.
virtual void setMaxStartColor(const video::SColor &color)=0
Set maximum starting color for particles.
virtual void setDirection(const core::vector3df &newDirection)=0
Set direction the emitter emits particles.
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0
Prepares an array with new particles to emit into the system.
virtual E_PARTICLE_EMITTER_TYPE getType() const
Get emitter type.
Definition IParticleEmitter.hpp:118
virtual u32 getMaxParticlesPerSecond() const =0
Get the maximum number of particles the emitter emits per second.
virtual void setMaxLifeTime(u32 lifeTimeMax)=0
Set the maximum particle life-time in milliseconds.
virtual u32 getMaxLifeTime() const =0
Get the maximum particle life-time in milliseconds.
virtual const core::vector3df & getDirection() const =0
Get direction the emitter emits particles.
virtual void setMinParticlesPerSecond(u32 minPPS)=0
Set minimum number of particles the emitter emits per second.
virtual u32 getMinParticlesPerSecond() const =0
Get the minimum number of particles the emitter emits per second.
virtual const video::SColor & getMaxStartColor() const =0
Get the maximum starting color for particles.
virtual void setMinLifeTime(u32 lifeTimeMin)=0
Set the minimum particle life-time in milliseconds.
Class for holding particle data.
Definition SParticle.hpp:18
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
const c8 *const ParticleEmitterTypeNames[]
Names for built in particle emitters.
Definition IParticleEmitter.hpp:30
E_PARTICLE_EMITTER_TYPE
Types of built in particle emitters.
Definition IParticleEmitter.hpp:18
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
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