summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h')
-rw-r--r--Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h27
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