Otclient  14/8/2020
particletype.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2020 OTClient <https://github.com/edubart/otclient>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef PARTICLETYPE_H
24 #define PARTICLETYPE_H
25 
26 #include "declarations.h"
29 #include <framework/otml/otml.h>
30 
31 class ParticleType : public LuaObject
32 {
33 public:
34  ParticleType();
35 
36  void load(const OTMLNodePtr& node);
37 
38  std::string getName() { return pName; }
39 
40 protected:
41  // name
42  std::string pName;
43 
44  // size
46 
47  // initial position related to emitter position
50 
51  // initial velocity
54 
55  // initial acceleration
58 
59  // duration
61 
62  // visual ralated
63  std::vector<Color> pColors;
64  std::vector<float> pColorsStops;
68 
69  friend class ParticleEmitter;
70 };
71 
72 #endif
ParticleType::pMaxVelocity
float pMaxVelocity
Definition: particletype.h:52
ParticleType::pStartSize
Size pStartSize
Definition: particletype.h:45
ParticleType::pTexture
TexturePtr pTexture
Definition: particletype.h:65
ParticleType::pMinDuration
float pMinDuration
Definition: particletype.h:60
otml.h
ParticleType::pMaxDuration
float pMaxDuration
Definition: particletype.h:60
ParticleType::load
void load(const OTMLNodePtr &node)
Definition: particletype.cpp:48
ParticleType::pMaxVelocityAngle
float pMaxVelocityAngle
Definition: particletype.h:53
ParticleType::ParticleType
ParticleType()
Definition: particletype.cpp:26
ParticleType::pMinVelocityAngle
float pMinVelocityAngle
Definition: particletype.h:53
ParticleEmitter
Definition: particleemitter.h:32
ParticleType::pColorsStops
std::vector< float > pColorsStops
Definition: particletype.h:64
ParticleType::pMaxAcceleration
float pMaxAcceleration
Definition: particletype.h:56
luaobject.h
Painter::CompositionMode
CompositionMode
Definition: painter.h:38
painter.h
ParticleType::pColors
std::vector< Color > pColors
Definition: particletype.h:63
ParticleType::pMaxAccelerationAngle
float pMaxAccelerationAngle
Definition: particletype.h:57
ParticleType::pMinVelocity
float pMinVelocity
Definition: particletype.h:52
ParticleType::pMinPositionAngle
float pMinPositionAngle
Definition: particletype.h:49
ParticleType::pMinAccelerationAngle
float pMinAccelerationAngle
Definition: particletype.h:57
ParticleType::pMinAcceleration
float pMinAcceleration
Definition: particletype.h:56
ParticleType::pFinalSize
Size pFinalSize
Definition: particletype.h:45
ParticleType::getName
std::string getName()
Definition: particletype.h:38
ParticleType::pMaxPositionAngle
float pMaxPositionAngle
Definition: particletype.h:49
ParticleType::pCompositionMode
Painter::CompositionMode pCompositionMode
Definition: particletype.h:67
declarations.h
ParticleType::pIgnorePhysicsAfter
float pIgnorePhysicsAfter
Definition: particletype.h:60
ParticleType::pName
std::string pName
Definition: particletype.h:42
stdext::shared_object_ptr< OTMLNode >
ParticleType::particleType
ParticleTypePtr particleType
Definition: particletype.h:66
ParticleType::pMaxPositionRadius
float pMaxPositionRadius
Definition: particletype.h:48
ParticleType
Definition: particletype.h:31
LuaObject
LuaObject, all script-able classes have it as base.
Definition: luaobject.h:30
TSize< int >
ParticleType::pMinPositionRadius
float pMinPositionRadius
Definition: particletype.h:48