summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/ParticleSystem/Modules/RotationByVelocityModule.h
blob: 548f9c3e795eb33b00f2be3b393c85d3c86b3c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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