RigsofRods
Soft-body Physics Simulation
TurboProp.cpp
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 #include "TurboProp.h"
22 
23 #include "Actor.h"
24 #include "Airfoil.h"
25 #include "GfxActor.h"
26 #include "GfxScene.h"
27 #include "ScriptEngine.h"
28 #include "SoundScriptManager.h"
29 #include "SimData.h"
30 
31 #include <fmt/format.h>
32 #include <Ogre.h>
33 
34 using namespace Ogre;
35 using namespace RoR;
36 
37 Turboprop::Turboprop(
38  ActorPtr a,
39  const char* propname,
40  NodeNum_t nr,
41  NodeNum_t nb,
42  NodeNum_t np1,
43  NodeNum_t np2,
44  NodeNum_t np3,
45  NodeNum_t np4,
46  NodeNum_t tqn,
47  float power,
48  Ogre::String const& propfoilname,
49  bool disable_smoke,
50  bool ispiston,
51  float fpitch
52 ):
53  m_actor(a)
54 {
59  // np3, np4, tqn ~ can be invalid
60 
61  failed = false;
62  failedold = false;
63 #ifdef USE_OPENAL
64  switch (m_actor->ar_num_aeroengines)
65  {
75  }
76 #endif //OPENAL
77  is_piston = ispiston;
78  fixed_pitch = fpitch;
79  torquenode = tqn;
80  rotenergy = 0;
81  pitchspeed = 5.0; //in degree/sec
82  numblades = 4;
83  twistmap[0] = 2;
84  twistmap[1] = 6;
85  twistmap[2] = 10;
86  twistmap[3] = 19;
87  twistmap[4] = 32;
88  noderef = nr;
89  nodeback = nb;
90  nodep[0] = np1;
91  nodep[1] = np2;
93  {
94  Plane pplane = Plane((m_actor->ar_nodes[nr].RelPosition - m_actor->ar_nodes[nb].RelPosition).normalisedCopy(), 0.0);
95  Vector3 apos = pplane.projectVector(m_actor->ar_nodes[nr].RelPosition);
96  Vector3 tpos = pplane.projectVector(m_actor->ar_nodes[tqn].RelPosition);
97  torquedist = (apos - tpos).length();
98  }
99  else
100  torquedist = 1.0;
101  if (np3 == NODENUM_INVALID)
102  numblades = 2;
103  else
104  {
105  nodep[2] = np3;
106  if (np4 == NODENUM_INVALID)
107  numblades = 3;
108  else
109  nodep[3] = np4;
110  }
111  propwash = 0;
112  timer = 0;
113  lastflip = 0;
114  warmupstart = 0.0;
115  warmuptime = 14.0;
116  warmup = false;
117  airfoil = new Airfoil(propfoilname);
118  fullpower = power;
119  max_torque = 9549.3 * fullpower / 1000.0;
120  indicated_torque = 0.0;
122  //bladewidth=radius/5.75;
123  bladewidth = 0.4;
124  proparea = 3.14159 * radius * radius;
125  airdensity = 1.225;
126  // regspeed=245.0*60.0/(2.0*3.14159*radius);//1010.0 //compute regulated speed for a tip speed of 245m/s
127  regspeed = 1010;
128  maxrevpitch = -5.0;
129  //smoke visual
130  if (disable_smoke)
131  {
132  smokeNode = 0;
133  smokePS = 0;
134  }
135  else
136  {
137  char dename[256];
138  sprintf(dename, "%s-smoke", propname);
139  smokeNode = App::GetGfxScene()->GetSceneManager()->getRootSceneNode()->createChildSceneNode();
140  smokePS = App::GetGfxScene()->GetSceneManager()->createParticleSystem(dename, "tracks/TurbopropSmoke");
141  if (smokePS)
142  {
143  smokePS->setVisibilityFlags(DEPTHMAP_DISABLED); // disable particles in depthmap
144  smokeNode->attachObject(smokePS);
145  smokePS->setCastShadows(false);
146  }
147  }
148 
149  reset();
150 }
151 
153 {
154  //A fast work around
155  //
159 
160  if (airfoil != nullptr)
161  {
162  delete airfoil;
163  }
164 
165  if (smokePS != nullptr)
166  {
167  smokePS->removeAllEmitters();
168  }
169 }
170 
172 {
173  RoR::NodeSB* node_buf = gfx_m_actor->GetSimNodeBuffer();
174 
175  //smoke
176  if (smokeNode)
177  {
178  smokeNode->setPosition(node_buf[nodeback].AbsPosition);
179  ParticleEmitter* emit = smokePS->getEmitter(0);
180  Vector3 dir = node_buf[nodeback].AbsPosition - node_buf[noderef].AbsPosition;
181  emit->setDirection(dir);
182  emit->setParticleVelocity(propwash - propwash / 10, propwash + propwash / 10);
183  if (!failed)
184  {
185  if (ignition)
186  {
187  emit->setEnabled(true);
188  emit->setColour(ColourValue(0.0, 0.0, 0.0, 0.03 + throtle * 0.05));
189  emit->setTimeToLive((0.03 + throtle * 0.05) / 0.1);
190  }
191  else
192  {
193  emit->setEnabled(false);
194  }
195  }
196  else
197  {
198  emit->setDirection(Vector3(0, 1, 0));
199  emit->setParticleVelocity(5, 9);
200  emit->setEnabled(true);
201  emit->setColour(ColourValue(0.0, 0.0, 0.0, 0.1));
202  emit->setTimeToLive(0.1 / 0.1);
203  }
204  }
205 
206 #ifdef USE_ANGELSCRIPT
207  if (failed != failedold)
208  {
210  failedold = failed;
211  }
212 #endif
213 }
214 
215 void Turboprop::setVisible(bool visible)
216 {
217  if (smokePS)
218  smokePS->setVisible(visible);
219 }
220 
221 void Turboprop::updateForces(float dt, int doUpdate)
222 {
223  if (doUpdate)
224  {
225  //tropospheric model valid up to 11.000m (33.000ft)
226  float altitude = m_actor->ar_nodes[noderef].AbsPosition.y;
227  //float sea_level_temperature=273.15+15.0; //in Kelvin
228  float sea_level_pressure = 101325; //in Pa
229  //float airtemperature=sea_level_temperature-altitude*0.0065; //in Kelvin
230  float airpressure = sea_level_pressure * pow(1.0 - 0.0065 * altitude / 288.15, 5.24947); //in Pa
231  airdensity = airpressure * 0.0000120896;//1.225 at sea level
233  }
234 
235  timer += dt;
236  //evaluate the rotation speed
237  float velacc = 0;
238  for (int i = 0; i < numblades; i++)
239  {
240  velacc += (m_actor->ar_nodes[nodep[i]].Velocity - m_actor->ar_nodes[noderef].Velocity).length();
241  }
242  rpm = (velacc / numblades) * RAD_PER_SEC_TO_RPM / radius;
243  //check for broken prop
244  Vector3 avg = Vector3::ZERO;
245  for (int i = 0; i < numblades; i++)
246  {
247  avg += m_actor->ar_nodes[nodep[i]].RelPosition;
248  }
249  avg = avg / numblades;
250  if ((avg - m_actor->ar_nodes[noderef].RelPosition).length() > 0.4)
251  {
252  failed = true;
253  }
254  //evaluate engine power
255  float enginepower = 0; //in kilo-Watt
256  float warmupfm_actor = 1.0;
257  if (warmup)
258  {
259  warmupfm_actor = (timer - warmupstart) / warmuptime;
260  if (warmupfm_actor >= 1.0)
261  warmup = false;
262  }
263  float revpenalty = 1.0;
264  if (reverse)
265  revpenalty = 0.5;
266  if (!failed && ignition)
267  enginepower = (0.0575 + throtle * revpenalty * 0.9425) * fullpower * warmupfm_actor;
268  //the magic formula
269  float enginecouple = 0.0; //in N.m
270  if (rpm > 10.0)
271  enginecouple = 9549.3 * enginepower / rpm;
272  else
273  enginecouple = 9549.3 * enginepower / 10.0;
274  indicated_torque = enginecouple;
275 
277  {
279  Plane ppl = Plane(along, 0);
280  Vector3 orth = ppl.projectVector(m_actor->ar_nodes[noderef].RelPosition) - ppl.projectVector(m_actor->ar_nodes[torquenode].RelPosition);
281  Vector3 cdir = orth.crossProduct(along);
282  cdir.normalise();
283  m_actor->ar_nodes[torquenode].Forces += (enginecouple / torquedist) * cdir;
284  }
285 
286  float tipforce = (enginecouple / radius) / numblades;
287  //okay, now we know the contribution from the engine
288 
289  //pitch
290  if (fixed_pitch > 0)
291  pitch = fixed_pitch;
292  else
293  {
294  if (!reverse)
295  {
296  if (throtle < 0.01)
297  {
298  //beta range
299  if (pitch > 0 && rpm < regspeed * 1.4)
300  pitch -= pitchspeed * dt;
301  if (rpm > regspeed * 1.4)
302  pitch += pitchspeed * dt;
303  }
304  else
305  {
306  float dpitch = rpm - regspeed;
307  if (dpitch > pitchspeed)
308  dpitch = pitchspeed;
309  if (dpitch < -pitchspeed)
310  dpitch = -pitchspeed;
311  if (!(dpitch < 0 && pitch < 0) && !(dpitch > 0 && pitch > 45))
312  pitch += dpitch * dt;
313  }
314  }
315  else
316  {
317  if (rpm < regspeed * 1.1)
318  {
319  if (pitch < -4.0)
320  pitch += pitchspeed * dt;
321  else
322  pitch -= pitchspeed * dt;
323  }
324  if (rpm > regspeed * 1.11)
325  {
326  pitch -= pitchspeed * dt;
327  }
328  }
329  }
330  if (!failed)
331  {
333  axis.normalise();
334  }
335  //estimate amount of energy
336  float estrotenergy = 0.5 * numblades * m_actor->ar_nodes[nodep[0]].mass * radius * radius * (rpm / RAD_PER_SEC_TO_RPM) * (rpm / RAD_PER_SEC_TO_RPM);
337  //for each blade
338  float totthrust = 0;
339  float tottorque = 0;
340  for (int i = 0; i < numblades; i++)
341  {
342  if (!failed && ignition)
343  {
344  Vector3 totaltipforce = Vector3::ZERO;
345  //span vector, left to right
347  spanv.normalise();
348  //chord vector, front to back
349  Vector3 refchordv = -axis.crossProduct(spanv);
350  //grab this for propulsive forces
351  Vector3 tipf = -refchordv;
352  totaltipforce += (tipforce - rpm / 10.0) * tipf; //add a bit of mechanical friction
353  //for each blade segment (there are 6 elements)
354  for (int j = 0; j < 5; j++) //outer to inner, the 6th blade element is ignored
355  {
356  //proportion
357  float proport = ((float)j + 0.5) / 6.0;
358  //evaluate wind direction
359  Vector3 wind = -(m_actor->ar_nodes[nodep[i]].Velocity * (1.0 - proport) + m_actor->ar_nodes[noderef].Velocity * proport);
360  float wspeed = wind.length();
361 
362  Vector3 liftv = spanv.crossProduct(-wind);
363  liftv.normalise();
364  //rotate according to pitch
365  Vector3 chordv = Quaternion(Degree(pitch + twistmap[j] - 7.0), spanv) * refchordv;
366  //wing normal
367  Vector3 normv = chordv.crossProduct(spanv);
368  //calculate angle of attack
369  Vector3 pwind = Plane(Vector3::ZERO, normv, chordv).projectVector(wind);
370  Vector3 dumb;
371  Degree daoa;
372  chordv.getRotationTo(pwind).ToAngleAxis(daoa, dumb);
373  float aoa = daoa.valueDegrees();
374  float raoa = daoa.valueRadians();
375  if (dumb.dotProduct(spanv) > 0)
376  {
377  aoa = -aoa;
378  raoa = -raoa;
379  };
380  //get airfoil data
381  float cz, cx, cm;
382  airfoil->getparams(aoa, 1.0, 0.0, &cz, &cx, &cm);
383  //surface computation
384  float s = radius * bladewidth / 6.0;
385 
386  //drag
387  //wforce=(8.0*cx+cx*cx/(3.14159*radius/0.4))*0.5*airdensity*wspeed*s*wind;
388  Vector3 eforce = (4.0 * cx + cx * cx / (3.14159 * radius / bladewidth)) * 0.5 * airdensity * wspeed * s * wind;
389  //lift
390  float lift = cz * 0.5 * airdensity * wspeed * wspeed * s;
391  eforce += lift * liftv;
392  totthrust += eforce.dotProduct(axis);
393 
394  //apply forces
395  m_actor->ar_nodes[noderef].Forces += eforce * proport;
396  totaltipforce += eforce * (1.0 - proport);
397  }
398  tottorque += tipf.dotProduct(totaltipforce) * radius;
399  //correct amount of energy
400  float correctfm_actor = 0;
401  if (rpm > 100)
402  correctfm_actor = (rotenergy - estrotenergy) / (numblades * radius * dt * rpm / RAD_PER_SEC_TO_RPM);
403  if (correctfm_actor > 1000.0)
404  correctfm_actor = 1000.0;
405  if (correctfm_actor < -1000.0)
406  correctfm_actor = -1000.0;
407  m_actor->ar_nodes[nodep[i]].Forces += totaltipforce + correctfm_actor * tipf;
408  }
409  else if (!m_actor->ar_nodes[noderef].Velocity.isZeroLength())
410  {
411  //failed case
412  //add drag
413  Vector3 wind = -m_actor->ar_nodes[nodep[i]].Velocity;
414  // determine nodes speed and divide by engines speed (with some magic numbers for tuning) to keep it rotating longer when shutoff in flight and stop after a while when plane is stopped (on the ground)
415  float wspeed = (wind.length() / 15.0f) / (m_actor->ar_nodes[noderef].Velocity.length() / 2.0f);
416  m_actor->ar_nodes[nodep[i]].Forces += airdensity * wspeed * wind;
417  }
418  }
419  //compute the next energy level
420  rotenergy += (double)tottorque * dt * rpm / RAD_PER_SEC_TO_RPM;
421  // sprintf(debug, "pitch %i thrust %i totenergy=%i apparentenergy=%i", (int)pitch, (int)totthrust, (int)rotenergy, (int)estrotenergy);
422  //prop wash
423  float speed = m_actor->ar_nodes[noderef].Velocity.length();
424  float thrsign = 1.0;
425  if (totthrust < 0)
426  {
427  thrsign = -0.1;
428  totthrust = -totthrust;
429  };
430  if (!failed)
431  propwash = thrsign * sqrt(totthrust / (0.5 * airdensity * proparea) + speed * speed) - speed;
432  else
433  propwash = 0;
434  if (propwash < 0)
435  propwash = 0;
436 }
437 
438 void Turboprop::setThrottle(float val)
439 {
440  if (val > 1.0)
441  val = 1.0;
442  if (val < 0.0)
443  val = 0.0;
444  throtle = val;
446 }
447 
449 {
450  return throtle;
451 }
452 
453 void Turboprop::setRPM(float _rpm)
454 {
455  rpm = _rpm;
456 }
457 
459 {
460  rpm = 0;
461  throtle = 0;
462  failed = false;
463  ignition = false;
464  reverse = false;
465  pitch = 0;
466  rotenergy = 0;
467 }
468 
470 {
471  throtle = 0;
472  reverse = !reverse;
473  pitch = 0;
474 }
475 
476 void Turboprop::setReverse(bool val)
477 {
478  reverse = val;
479 }
480 
482 {
483  if (timer - lastflip < 0.3)
484  return;
485  ignition = !ignition;
486  if (ignition && !failed)
487  {
488  warmup = true;
489  warmupstart = timer;
491  }
492  else
493  {
495  }
496  lastflip = timer;
497 }
ROR_ASSERT
#define ROR_ASSERT(_EXPR)
Definition: Application.h:40
RoR::SS_MOD_THROTTLE7
@ SS_MOD_THROTTLE7
Definition: SoundScriptManager.h:145
RoR::Turboprop::fullpower
float fullpower
in kW
Definition: TurboProp.h:100
RoR::Turboprop::reset
void reset()
Definition: TurboProp.cpp:458
RoR::Turboprop::setRPM
void setRPM(float _rpm)
Definition: TurboProp.cpp:453
RoR::SS_TRIG_AEROENGINE8
@ SS_TRIG_AEROENGINE8
Definition: SoundScriptManager.h:96
RoR::SS_MOD_THROTTLE6
@ SS_MOD_THROTTLE6
Definition: SoundScriptManager.h:144
RoR::SS_MOD_AEROENGINE1
@ SS_MOD_AEROENGINE1
Definition: SoundScriptManager.h:127
RoR::node_t::Velocity
Ogre::Vector3 Velocity
Definition: SimData.h:294
RoR::SE_TRUCK_ENGINE_FIRE
@ SE_TRUCK_ENGINE_FIRE
triggered when the planes engines start to get on fire, the argument refers to the actor ID of the ve...
Definition: ScriptEvents.h:39
RoR::Turboprop::torquedist
float torquedist
Definition: TurboProp.h:98
RoR::SS_MOD_AEROENGINE5
@ SS_MOD_AEROENGINE5
Definition: SoundScriptManager.h:147
RoR::NodeSB
Definition: SimBuffers.h:67
RoR::node_t::AbsPosition
Ogre::Vector3 AbsPosition
absolute position in the world (shaky)
Definition: SimData.h:293
RoR::SS_TRIG_AEROENGINE2
@ SS_TRIG_AEROENGINE2
Definition: SoundScriptManager.h:56
RoR::Turboprop::~Turboprop
~Turboprop()
Definition: TurboProp.cpp:152
RoR::Turboprop::torquenode
NodeNum_t torquenode
Definition: TurboProp.h:138
RoR::GfxActor::GetSimNodeBuffer
NodeSB * GetSimNodeBuffer()
Definition: GfxActor.h:120
RoR::Actor::ar_instance_id
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
Definition: Actor.h:370
RoR::SS_TRIG_AEROENGINE6
@ SS_TRIG_AEROENGINE6
Definition: SoundScriptManager.h:94
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition: ForwardDeclarations.h:53
RoR::Turboprop::smokePS
Ogre::ParticleSystem * smokePS
Definition: TurboProp.h:112
RoR::Turboprop::pitchspeed
float pitchspeed
Definition: TurboProp.h:109
RoR::Turboprop::setReverse
void setReverse(bool val)
Definition: TurboProp.cpp:476
RoR::TRIGGER_EVENT_ASYNC
void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED) invoke script function eventCallbackEx(),...
Definition: ScriptEngine.h:51
RoR::Turboprop::warmuptime
float warmuptime
Definition: TurboProp.h:106
RoR::Turboprop::pitch
float pitch
Definition: TurboProp.h:43
RoR::SS_MOD_AEROENGINE4
@ SS_MOD_AEROENGINE4
Definition: SoundScriptManager.h:130
RoR::SS_TRIG_AEROENGINE3
@ SS_TRIG_AEROENGINE3
Definition: SoundScriptManager.h:57
RoR::SS_MOD_AEROENGINE8
@ SS_MOD_AEROENGINE8
Definition: SoundScriptManager.h:150
Airfoil.h
RoR::SS_MOD_AEROENGINE2
@ SS_MOD_AEROENGINE2
Definition: SoundScriptManager.h:128
RoR::Turboprop::smokeNode
Ogre::SceneNode * smokeNode
Definition: TurboProp.h:113
RoR::Turboprop::is_piston
bool is_piston
Definition: TurboProp.h:42
RoR::node_t::RelPosition
Ogre::Vector3 RelPosition
relative to the local physics origin (one origin per actor) (shaky)
Definition: SimData.h:292
RoR::Turboprop::numblades
int numblades
Definition: TurboProp.h:107
RefCountingObjectPtr< Actor >
RoR::Turboprop::flipStart
void flipStart()
Definition: TurboProp.cpp:481
Actor.h
RoR::GfxScene::GetSceneManager
Ogre::SceneManager * GetSceneManager()
Definition: GfxScene.h:64
RoR::Turboprop::radius
float radius
Definition: TurboProp.h:121
RoR::Turboprop::indicated_torque
float indicated_torque
Definition: TurboProp.h:44
RoR::Turboprop::src_id
int src_id
Definition: TurboProp.h:130
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:52
RoR::Actor::ar_num_aeroengines
int ar_num_aeroengines
Definition: Actor.h:324
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RAD_PER_SEC_TO_RPM
static const float RAD_PER_SEC_TO_RPM
Convert radian/second to RPM (60/2*PI)
Definition: SimConstants.h:37
RoR::SS_MOD_THROTTLE1
@ SS_MOD_THROTTLE1
Definition: SoundScriptManager.h:139
RoR::Turboprop::ignition
bool ignition
Definition: TurboProp.h:120
RoR::SS_TRIG_AEROENGINE1
@ SS_TRIG_AEROENGINE1
Definition: SoundScriptManager.h:55
RoR::Turboprop::getThrottle
float getThrottle()
Definition: TurboProp.cpp:448
ScriptEngine.h
RoR::Turboprop::airdensity
float airdensity
Definition: TurboProp.h:102
RoR::Turboprop::setThrottle
void setThrottle(float val)
Definition: TurboProp.cpp:438
RoR::Turboprop::max_torque
float max_torque
Definition: TurboProp.h:45
RoR::Airfoil::getparams
void getparams(float a, float cratio, float cdef, float *ocl, float *ocd, float *ocm)
Definition: Airfoil.cpp:105
GfxScene.h
SOUND_START
#define SOUND_START(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:35
RoR::Turboprop::propwash
float propwash
Definition: TurboProp.h:127
SoundScriptManager.h
RoR::Turboprop::thr_id
int thr_id
Definition: TurboProp.h:131
RoR::SS_MOD_THROTTLE3
@ SS_MOD_THROTTLE3
Definition: SoundScriptManager.h:141
RoR::SS_MOD_NONE
@ SS_MOD_NONE
Definition: SoundScriptManager.h:124
RoR::Turboprop::setVisible
void setVisible(bool visible) override
Definition: TurboProp.cpp:215
RoR::SS_TRIG_AEROENGINE4
@ SS_TRIG_AEROENGINE4
Definition: SoundScriptManager.h:58
SOUND_STOP
#define SOUND_STOP(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:36
RoR::Turboprop::regspeed
float regspeed
Definition: TurboProp.h:111
RoR::SS_MOD_AEROENGINE7
@ SS_MOD_AEROENGINE7
Definition: SoundScriptManager.h:149
RoR::Turboprop::timer
float timer
Definition: TurboProp.h:103
RoR::Turboprop::failedold
bool failedold
Definition: TurboProp.h:123
RoR::NodeSB::AbsPosition
Ogre::Vector3 AbsPosition
Definition: SimBuffers.h:69
RoR::Turboprop::bladewidth
float bladewidth
Definition: TurboProp.h:108
RoR::Turboprop::twistmap
float twistmap[5]
Definition: TurboProp.h:114
SOUND_MODULATE
#define SOUND_MODULATE(_ACTOR_, _MOD_, _VALUE_)
Definition: SoundScriptManager.h:40
RoR::SS_TRIG_AEROENGINE5
@ SS_TRIG_AEROENGINE5
Definition: SoundScriptManager.h:93
TurboProp.h
RoR::Actor::ar_nodes
node_t * ar_nodes
Definition: Actor.h:273
RoR::Turboprop::nodeback
NodeNum_t nodeback
Definition: TurboProp.h:135
RoR::Turboprop::rotenergy
double rotenergy
Definition: TurboProp.h:115
RoR::Turboprop::nodep
NodeNum_t nodep[4]
Definition: TurboProp.h:137
RoR::SS_MOD_THROTTLE5
@ SS_MOD_THROTTLE5
Definition: SoundScriptManager.h:143
RoR::Turboprop::m_actor
ActorPtr m_actor
Definition: TurboProp.h:134
RoR::SS_MOD_THROTTLE4
@ SS_MOD_THROTTLE4
Definition: SoundScriptManager.h:142
RoR::Turboprop::rpm
float rpm
Definition: TurboProp.h:124
RoR::Turboprop::updateForces
void updateForces(float dt, int doUpdate)
Definition: TurboProp.cpp:221
RoR::Turboprop::airfoil
Airfoil * airfoil
Definition: TurboProp.h:99
RoR::SS_TRIG_AEROENGINE7
@ SS_TRIG_AEROENGINE7
Definition: SoundScriptManager.h:95
RoR::Turboprop::warmupstart
float warmupstart
Definition: TurboProp.h:105
RoR::Turboprop::mod_id
int mod_id
Definition: TurboProp.h:129
RoR::Turboprop::fixed_pitch
float fixed_pitch
Definition: TurboProp.h:116
RoR::Airfoil
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
Definition: Airfoil.h:31
RoR::GfxActor
Definition: GfxActor.h:52
Ogre
Definition: ExtinguishableFireAffector.cpp:35
GfxActor.h
Manager for all visuals belonging to a single actor.
RoR::Turboprop::lastflip
float lastflip
Definition: TurboProp.h:104
RoR::Turboprop::updateVisuals
void updateVisuals(RoR::GfxActor *gfx_actor) override
Definition: TurboProp.cpp:171
RoR::Turboprop::noderef
NodeNum_t noderef
Definition: TurboProp.h:136
RoR::Turboprop::throtle
float throtle
Definition: TurboProp.h:125
RoR::Turboprop::reverse
bool reverse
Definition: TurboProp.h:118
RoR::Turboprop::toggleReverse
void toggleReverse()
Definition: TurboProp.cpp:469
RoR::Turboprop::axis
Ogre::Vector3 axis
Definition: TurboProp.h:128
RoR::node_t::mass
Ogre::Real mass
Definition: SimData.h:297
RoR::Turboprop::warmup
bool warmup
Definition: TurboProp.h:119
RoR::Turboprop::maxrevpitch
float maxrevpitch
Definition: TurboProp.h:110
RoR::DEPTHMAP_DISABLED
@ DEPTHMAP_DISABLED
Definition: Application.h:285
RoR::SS_MOD_AEROENGINE6
@ SS_MOD_AEROENGINE6
Definition: SoundScriptManager.h:148
RoR::SS_TRIG_NONE
@ SS_TRIG_NONE
Definition: SoundScriptManager.h:53
RoR::SS_MOD_THROTTLE2
@ SS_MOD_THROTTLE2
Definition: SoundScriptManager.h:140
RoR::SS_MOD_AEROENGINE3
@ SS_MOD_AEROENGINE3
Definition: SoundScriptManager.h:129
RoR::Turboprop::failed
bool failed
Definition: TurboProp.h:122
RoR
Definition: AppContext.h:36
RoR::Turboprop::proparea
float proparea
Definition: TurboProp.h:101
RoR::App::GetGfxScene
GfxScene * GetGfxScene()
Definition: Application.cpp:276
RoR::SS_MOD_THROTTLE8
@ SS_MOD_THROTTLE8
Definition: SoundScriptManager.h:146
RoR::node_t::Forces
Ogre::Vector3 Forces
Definition: SimData.h:295