RigsofRods
Soft-body Physics Simulation
FireExtinguisherAffector.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 
29 
30 namespace Ogre {
31 
34 
37 
46 class FireExtinguisherAffector : public ParticleAffector
47 {
48 public:
50  class CmdEffectiveness : public ParamCommand
51  {
52  public:
53  String doGet(const void* target) const;
54  void doSet(void* target, const String& val);
55  };
56 
58  FireExtinguisherAffector(ParticleSystem* psys);
59 
61  void _affectParticles(ParticleSystem* pSystem, Real timeElapsed);
62 
64  void setEffectiveness(Real effectiveness);
65 
67  Real getEffectiveness(void) const;
68 
71 
72 protected:
73  // a reference to the extinguishable fire
75 
78 };
79 
82 
83 } // namespace Ogre
84 
85 #endif //USE_ANGELSCRIPT
Ogre::FireExtinguisherAffector::getEffectiveness
Real getEffectiveness(void) const
Gets the bounce value of the deflection.
Definition: FireExtinguisherAffector.cpp:120
Ogre::FireExtinguisherAffector::mEffectiveness
Real mEffectiveness
effectiveness factor (1 means as effective as water, everything higher is more effective while anythi...
Definition: FireExtinguisherAffector.h:77
Ogre::FireExtinguisherAffector::mEfaf
ExtinguishableFireAffectorFactory * mEfaf
Definition: FireExtinguisherAffector.h:74
Ogre::FireExtinguisherAffector::FireExtinguisherAffector
FireExtinguisherAffector(ParticleSystem *psys)
Default constructor.
Definition: FireExtinguisherAffector.cpp:42
Ogre::FireExtinguisherAffector
This class defines a ParticleAffector which deflects particles.
Definition: FireExtinguisherAffector.h:46
Ogre::FireExtinguisherAffector::setEffectiveness
void setEffectiveness(Real effectiveness)
Sets the bounce value of the deflection.
Definition: FireExtinguisherAffector.cpp:115
Ogre::FireExtinguisherAffector::_affectParticles
void _affectParticles(ParticleSystem *pSystem, Real timeElapsed)
See ParticleAffector.
Definition: FireExtinguisherAffector.cpp:78
Ogre::FireExtinguisherAffector::CmdEffectiveness::doGet
String doGet(const void *target) const
Definition: FireExtinguisherAffector.cpp:130
ExtinguishableFireAffectorFactory.h
Ogre::FireExtinguisherAffector::CmdEffectiveness
Command object for bounce (see ParamCommand).
Definition: FireExtinguisherAffector.h:50
Ogre::ExtinguishableFireAffectorFactory
Factory class for DeflectorPlaneAffector.
Definition: ExtinguishableFireAffectorFactory.h:37
Ogre::FireExtinguisherAffector::msEffectivenessCmd
static CmdEffectiveness msEffectivenessCmd
Command objects.
Definition: FireExtinguisherAffector.h:70
Ogre
Definition: ExtinguishableFireAffector.cpp:35
Ogre::FireExtinguisherAffector::CmdEffectiveness::doSet
void doSet(void *target, const String &val)
Definition: FireExtinguisherAffector.cpp:136