diff options
Diffstat (limited to 'Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h')
-rw-r--r-- | Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h | 27 |
1 files changed, 27 insertions, 0 deletions
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<class TransferFunction> + void Transfer (TransferFunction& transfer); + +private: + MinMaxCurve m_Curve; + Vector2f m_Range; +}; + +#endif // SHURIKENMODULEROTATIONBYVELOCITY_H |