diff options
author | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
commit | 8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch) | |
tree | fe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/graphics/particles/je_particle_emitter.h | |
parent | a907c39756ef6b368d06643afa491c49a9044a8e (diff) |
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/graphics/particles/je_particle_emitter.h')
-rw-r--r-- | src/libjin/graphics/particles/je_particle_emitter.h | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/src/libjin/graphics/particles/je_particle_emitter.h b/src/libjin/graphics/particles/je_particle_emitter.h deleted file mode 100644 index 03f83be..0000000 --- a/src/libjin/graphics/particles/je_particle_emitter.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef __JE_PARTICLE_EMITTER_H__ -#define __JE_PARTICLE_EMITTER_H__ - -#include "../../common/je_temporary.h" -#include "../../math/je_vector2.hpp" - -#include "je_particle.h" - -namespace JinEngine -{ - namespace Graphics - { - namespace Particles - { - - struct PositionDef - { - bool enableRandom = false; - Struct(position, - struct - { - Math::Vector2<float> floor; - Math::Vector2<float> ceil; - } random; - Math::Vector2<float> position; - ); - }; - - struct DirectionDef - { - bool enableRandom = false; - Struct(direction, - struct - { - float floor = 0; - float ceil = 0; - } random; - float direction = 0; - ); - }; - - /// - /// How many particles emitted per second. - /// - struct EmitRateDef - { - bool enableRandom = false; - Struct(rate, - struct - { - float floor = 1; - float ceil = 1; - } random; - float rate = 1; - ); - }; - - /// - /// Initial speed of particle. - /// - struct ForceDef - { - bool enableRandom = false; - Struct(force, - struct - { - float floor = 1; - float ceil = 1; - } random; - float force = 1; - ); - }; - - /// - /// Definition of particle emitter. - /// - struct ParticleEmitterDef - { - EmitRateDef emitRateDef; ///< Emit rate. - - PositionDef positionDef; ///< Emit position(relativily to the particle system center). - DirectionDef directionDef; ///< Emit direction. - ForceDef forceDef; ///< Emit force. - }; - - class ParticleSystem; - - /// - /// Emit a single particle. - /// - class ParticleEmitter - { - public: - /// - /// - /// - ParticleEmitter(ParticleSystem& ps); - - /// - /// - /// - void update(float dt); - - private: - /// - /// - /// - ParticleSystem& mPS; - - ParticleEmitterDef& mDef; - - ParticleDef& mPDef; - - /// - /// Emit particle according to emitter definition and particle definition, particle system should - /// assign particle value to the particle in particle pool, but not use this return particle. - /// - void emit(); - - /// - /// - /// - float mTime; - - /// - /// - /// - float mInterval; - - }; - - } // namespace Particles - } // namespace Graphics -} // namespace JinEngine - -#endif
\ No newline at end of file |