aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h
new file mode 100644
index 0000000..8db5752
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h
@@ -0,0 +1,56 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
6#define __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
7
8#include "IParticleRotationAffector.h"
9
10namespace irr
11{
12namespace scene
13{
14
15//! Particle Affector for rotating particles about a point
16class CParticleRotationAffector : public IParticleRotationAffector
17{
18public:
19
20 CParticleRotationAffector( const core::vector3df& speed = core::vector3df(5.0f, 5.0f, 5.0f),
21 const core::vector3df& point = core::vector3df() );
22
23 //! Affects a particle.
24 virtual void affect(u32 now, SParticle* particlearray, u32 count);
25
26 //! Set the point that particles will attract to
27 virtual void setPivotPoint( const core::vector3df& point ) { PivotPoint = point; }
28
29 //! Set the speed in degrees per second
30 virtual void setSpeed( const core::vector3df& speed ) { Speed = speed; }
31
32 //! Get the point that particles are attracted to
33 virtual const core::vector3df& getPivotPoint() const { return PivotPoint; }
34
35 //! Get the speed in degrees per second
36 virtual const core::vector3df& getSpeed() const { return Speed; }
37
38 //! Writes attributes of the object.
39 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
40
41 //! Reads attributes of the object.
42 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
43
44private:
45
46 core::vector3df PivotPoint;
47 core::vector3df Speed;
48 u32 LastTime;
49};
50
51} // end namespace scene
52} // end namespace irr
53
54
55#endif // __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
56