From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- .../Modules/RotationByVelocityModule.h | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h (limited to 'Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h') diff --git a/Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h b/Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h new file mode 100644 index 0000000..548f9c3 --- /dev/null +++ b/Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h @@ -0,0 +1,27 @@ +#ifndef SHURIKENMODULEROTATIONBYVELOCITY_H +#define SHURIKENMODULEROTATIONBYVELOCITY_H + +#include "ParticleSystemModule.h" +#include "Runtime/Graphics/ParticleSystem/ParticleSystemCurves.h" +#include "Runtime/Math/Vector2.h" + +class RotationBySpeedModule : public ParticleSystemModule +{ +public: + DECLARE_MODULE (RotationBySpeedModule) + RotationBySpeedModule (); + + void Update (const ParticleSystemReadOnlyState& roState, const ParticleSystemState& state, ParticleSystemParticles& ps, const size_t fromIndex, const size_t toIndex); + void CheckConsistency (); + + inline MinMaxCurve& GetCurve() { return m_Curve; } + + template + void Transfer (TransferFunction& transfer); + +private: + MinMaxCurve m_Curve; + Vector2f m_Range; +}; + +#endif // SHURIKENMODULEROTATIONBYVELOCITY_H -- cgit v1.1-26-g67d0