From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- .../ParticleSystem/Modules/ClampVelocityModule.h | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h (limited to 'Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h') diff --git a/Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h b/Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h new file mode 100644 index 0000000..e315d61 --- /dev/null +++ b/Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h @@ -0,0 +1,29 @@ +#ifndef SHURIKENMODULECLAMPVELOCITY_H +#define SHURIKENMODULECLAMPVELOCITY_H + +#include "ParticleSystemModule.h" +#include "Runtime/Graphics/ParticleSystem/ParticleSystemCurves.h" + +class ClampVelocityModule : public ParticleSystemModule +{ +public: + DECLARE_MODULE (ClampVelocityModule) + ClampVelocityModule (); + + void Update (const ParticleSystemReadOnlyState& roState, const ParticleSystemState& state, ParticleSystemParticles& ps, const size_t fromIndex, const size_t toIndex); + void CheckConsistency (); + + template + void Transfer (TransferFunction& transfer); + +private: + MinMaxCurve m_X; + MinMaxCurve m_Y; + MinMaxCurve m_Z; + MinMaxCurve m_Magnitude; + bool m_InWorldSpace; + bool m_SeparateAxis; + float m_Dampen; +}; + +#endif // SHURIKENMODULECLAMPVELOCITY_H -- cgit v1.1-26-g67d0