Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
ExtinguishableFireAffector.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5
6 For more information, see http://www.rigsofrods.org/
7
8 Rigs of Rods is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 3, as
10 published by the Free Software Foundation.
11
12 Rigs of Rods is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23#ifdef USE_ANGELSCRIPT
24
25#include <OgreParticleAffector.h>
26#include <OgreVector3.h>
27#include <OgreVector2.h>
28
29namespace Ogre {
30
33
36
45class ExtinguishableFireAffector : public ParticleAffector
46{
47public:
49 class CmdMiddlePoint : public ParamCommand
50 {
51 public:
52 String doGet(const void* target) const;
53 void doSet(void* target, const String& val);
54 };
55
57 class CmdIntensity : public ParamCommand
58 {
59 public:
60 String doGet(const void* target) const;
61 void doSet(void* target, const String& val);
62 };
63
65 class CmdMaxIntensity : public ParamCommand
66 {
67 public:
68 String doGet(const void* target) const;
69 void doSet(void* target, const String& val);
70 };
71
73 class CmdIntensityGrowth : public ParamCommand
74 {
75 public:
76 String doGet(const void* target) const;
77 void doSet(void* target, const String& val);
78 };
79
81 class CmdRadius : public ParamCommand
82 {
83 public:
84 String doGet(const void* target) const;
85 void doSet(void* target, const String& val);
86 };
87
89 ExtinguishableFireAffector(ParticleSystem* psys);
90
93
95 void _affectParticles(ParticleSystem* pSystem, Real timeElapsed);
96
98 void setMiddlePoint(const Vector3& pos);
99
101 Vector3 getMiddlePoint(void) const;
102
104 void setIntensity(Real intensity);
105
107 Real getIntensity(void) const;
108
110 void setMaxIntensity(Real intensity);
111
113 Real getMaxIntensity(void) const;
114
116 void setIntensityGrowth(Real intensity);
117
119 Real getIntensityGrowth(void) const;
120
122 void setRadius(Real radius);
123
125 Real getRadius(void) const;
126
127 bool isTemplate() const;
128 Vector3 getAbsoluteMiddlePoint(void) const;
129 Real reduceIntensity(Real amount);
130 ParticleSystem* getParticleSystem() { return mPsys; };
131
133 void setInstanceName(String iname) { objectInstanceName = iname; };
135
142
143protected:
146
149
152
153 ParticleSystem* mPsys;
154
161
164};
165
166} // namespace Ogre
167
168#endif // USE_ANGELSCRIPT
Command object for intensity growth (see ParamCommand).
Command object for intensity (see ParamCommand).
Command object for maximum intensity (see ParamCommand).
Command object for middle point (see ParamCommand).
Command object for radius (see ParamCommand).
This class defines a ParticleAffector which deflects particles.
Real getRadius(void) const
Gets the radius for the interaction with the FireExtiniguisher affector.
void setMaxIntensity(Real intensity)
Sets the maximum intensity.
Vector3 getMiddlePoint(void) const
Gets the sphere middle point.
static CmdMiddlePoint msMiddlePointCmd
Command objects.
Real getMaxIntensity(void) const
Gets the maximum intensity.
void setRadius(Real radius)
Sets the radius for the interaction with the FireExtiniguisher affector.
void setMiddlePoint(const Vector3 &pos)
Sets the sphere middle point.
void setInstanceName(String iname)
Sets the instance name of the parent object for this particle system.
Real getIntensityGrowth(void) const
Gets the intensity growth rate.
String objectInstanceName
The instance name of the parent object.
Real getIntensity(void) const
Gets the intensity.
void setIntensity(Real intensity)
Sets the intensity.
void setIntensityGrowth(Real intensity)
Sets the intensity growth rate.
void _affectParticles(ParticleSystem *pSystem, Real timeElapsed)
See ParticleAffector.