summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.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/ClampVelocityModule.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h')
-rw-r--r--Runtime/Graphics/ParticleSystem/Modules/ClampVelocityModule.h29
1 files changed, 29 insertions, 0 deletions
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<class TransferFunction>
+ 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