diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h |
Diffstat (limited to 'Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h')
-rw-r--r-- | Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h b/Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h new file mode 100644 index 0000000..2abc949 --- /dev/null +++ b/Runtime/Graphics/ParticleSystem/Modules/ExternalForcesModule.h @@ -0,0 +1,25 @@ +#ifndef SHURIKENMODULEEXTERNALFORCES_H +#define SHURIKENMODULEEXTERNALFORCES_H + +#include "ParticleSystemModule.h" + +class ExternalForcesModule : public ParticleSystemModule +{ +public: + DECLARE_MODULE (ExternalForcesModule) + ExternalForcesModule (); + + void Update (const ParticleSystemReadOnlyState& roState, const ParticleSystemState& state, ParticleSystemParticles& ps, const size_t fromIndex, const size_t toIndex, float dt); + void CheckConsistency() {}; + + static void AllocateAndCache(const ParticleSystemReadOnlyState& roState, ParticleSystemState& state); + static void FreeCache(ParticleSystemState& state); + + template<class TransferFunction> + void Transfer (TransferFunction& transfer); + +private: + float m_Multiplier; +}; + +#endif // SHURIKENMODULEEXTERNALFORCES_H |