123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // RotationByVelocityModule.h
- // libcocos2d Mac
- //
- // Created by 徐俊杰 on 2020/4/24.
- //
- #ifndef RotationByVelocityModule_h
- #define RotationByVelocityModule_h
- //#include "cocos2d.h"
- #include "rparticle/Macros/RParticleMacros.h"
- #include "rparticle/Modules/ParticleSystemModule.h"
- #include "rparticle/ParticleSystemCurves.h"
- //#include "Runtime/Math/Vector2.h"
- NS_RRP_BEGIN
- 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; }
- inline const MinMaxCurve& GetCurve() const { return m_Curve; }
-
- template<class TransferFunction>
- void Transfer (TransferFunction& transfer);
-
- void SetRange(const Vector2f& value) { m_Range = value; }
- const Vector2f& GetRange() const { return m_Range; }
-
- private:
- MinMaxCurve m_Curve;
- Vector2f m_Range;
- };
- NS_RRP_END
- #endif /* RotationByVelocityModule_h */
|