diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/ParticleSystem/Modules/UVModule.h |
Diffstat (limited to 'Runtime/Graphics/ParticleSystem/Modules/UVModule.h')
-rw-r--r-- | Runtime/Graphics/ParticleSystem/Modules/UVModule.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Runtime/Graphics/ParticleSystem/Modules/UVModule.h b/Runtime/Graphics/ParticleSystem/Modules/UVModule.h new file mode 100644 index 0000000..5ed9e7f --- /dev/null +++ b/Runtime/Graphics/ParticleSystem/Modules/UVModule.h @@ -0,0 +1,36 @@ +#ifndef SHURIKENMODULEUV_H +#define SHURIKENMODULEUV_H + +#include "ParticleSystemModule.h" +#include "Runtime/Graphics/ParticleSystem/PolynomialCurve.h" + +struct ParticleSystemParticles; + +class UVModule : public ParticleSystemModule +{ +public: + DECLARE_MODULE (UVModule) + UVModule (); + + void Update (const ParticleSystemParticles& ps, float* tempSheetIndex, size_t fromIndex, size_t toIndex); + void CheckConsistency (); + + inline MinMaxCurve& GetCurve() { return m_Curve; } + + void GetNumTiles(int& uvTilesX, int& uvTilesY) const; + + template<class TransferFunction> + void Transfer (TransferFunction& transfer); + +private: + enum { kWholeSheet, kSingleRow, kNumAnimationTypes }; + + MinMaxCurve m_Curve; + int m_TilesX, m_TilesY; + int m_AnimationType; + int m_RowIndex; + float m_Cycles; + bool m_RandomRow; +}; + +#endif // SHURIKENMODULEUV_H |