RigsofRods
Soft-body Physics Simulation
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
i
k
l
m
n
p
r
s
t
u
v
w
Typedefs
a
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
d
g
h
l
m
n
o
p
r
s
t
v
Enumerator
a
b
c
d
f
g
h
l
m
n
o
r
s
t
v
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
k
o
Macros
_
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
x
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
source
main
physics
air
TurboProp.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
#include "
Application.h
"
24
25
#include "
AeroEngine.h
"
26
#include "
SimData.h
"
27
28
#include <Ogre.h>
29
30
namespace
RoR
{
31
34
37
38
class
Turboprop
:
public
AeroEngine
39
{
40
public
:
41
42
bool
is_piston
;
43
float
pitch
;
44
float
indicated_torque
;
45
float
max_torque
;
46
47
Turboprop
(
48
ActorPtr
a,
49
const
char
* propname,
50
NodeNum_t
nr,
51
NodeNum_t
nb,
52
NodeNum_t
np1,
53
NodeNum_t
np2,
54
NodeNum_t
np3,
55
NodeNum_t
np4,
56
NodeNum_t
tqn,
57
float
power,
58
Ogre::String
const
& propfoilname,
59
bool
disable_smoke,
60
bool
ispiston,
61
float
fpitch
62
);
63
~Turboprop
();
64
65
void
updateForces
(
float
dt,
int
doUpdate);
66
67
void
setThrottle
(
float
val);
68
69
float
getThrottle
();
70
71
void
reset
();
72
73
void
toggleReverse
();
74
void
setReverse
(
bool
val);
75
bool
getReverse
() {
return
reverse
; };
76
77
void
flipStart
();
78
79
float
getRPM
() {
return
rpm
; };
80
float
getRPMpc
() {
return
rpm
/ 10.0f; };
81
void
setRPM
(
float
_rpm);
82
float
getpropwash
() {
return
propwash
; };
83
Ogre::Vector3
getAxis
() {
return
axis
; };
84
bool
isFailed
() {
return
failed
; };
85
AeroEngineType
getType
() {
return
AeroEngineType::AE_XPROP
; };
86
bool
getIgnition
() {
return
ignition
; };
87
void
setIgnition
(
bool
val) {
ignition
= val; };
88
int
getNoderef
() {
return
noderef
; };
89
NodeNum_t
GetFrontNode
()
const override
{
return
RoR::NODENUM_INVALID
; };
// turboprops have no front node
90
NodeNum_t
GetBackNode
()
const override
{
return
nodeback
; };
91
bool
getWarmup
() {
return
warmup
; };
92
float
getRadius
() {
return
radius
; };
93
94
// Visuals
95
void
updateVisuals
(
RoR::GfxActor
* gfx_actor)
override
;
96
void
setVisible
(
bool
visible)
override
;
97
98
private
:
99
100
float
torquedist
;
101
Airfoil
*
airfoil
;
102
float
fullpower
;
103
float
proparea
;
104
float
airdensity
;
105
float
timer
;
106
float
lastflip
;
107
float
warmupstart
;
108
float
warmuptime
;
109
int
numblades
;
110
float
bladewidth
;
111
float
pitchspeed
;
112
float
maxrevpitch
;
113
float
regspeed
;
114
Ogre::ParticleSystem*
smokePS
;
115
Ogre::SceneNode*
smokeNode
;
116
float
twistmap
[5];
117
double
rotenergy
;
118
float
fixed_pitch
;
119
120
bool
reverse
;
121
bool
warmup
;
122
bool
ignition
;
123
float
radius
;
124
bool
failed
;
125
bool
failedold
;
126
float
rpm
;
127
float
throtle
;
128
char
debug
[256];
129
float
propwash
;
130
Ogre::Vector3
axis
;
131
int
mod_id
;
132
int
src_id
;
133
int
thr_id
;
134
135
// Attachment
136
ActorPtr
m_actor
;
137
NodeNum_t
nodeback
;
138
NodeNum_t
noderef
;
139
NodeNum_t
nodep
[4];
140
NodeNum_t
torquenode
;
141
};
142
145
146
}
// namespace RoR
RoR::Turboprop::fullpower
float fullpower
in kW
Definition:
TurboProp.h:102
RoR::Turboprop::reset
void reset()
Definition:
TurboProp.cpp:459
RoR::Turboprop::setRPM
void setRPM(float _rpm)
Definition:
TurboProp.cpp:454
RoR::Turboprop::torquedist
float torquedist
Definition:
TurboProp.h:100
RoR::Turboprop::getType
AeroEngineType getType()
Definition:
TurboProp.h:85
RoR::Turboprop::~Turboprop
~Turboprop()
Definition:
TurboProp.cpp:152
RoR::Turboprop::torquenode
NodeNum_t torquenode
Definition:
TurboProp.h:140
RoR::Turboprop::getRPMpc
float getRPMpc()
Definition:
TurboProp.h:80
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition:
ForwardDeclarations.h:55
RoR::Turboprop::smokePS
Ogre::ParticleSystem * smokePS
Definition:
TurboProp.h:114
RoR::Turboprop::pitchspeed
float pitchspeed
Definition:
TurboProp.h:111
RoR::Turboprop::setReverse
void setReverse(bool val)
Definition:
TurboProp.cpp:477
RoR::Turboprop::warmuptime
float warmuptime
Definition:
TurboProp.h:108
RoR::Turboprop::pitch
float pitch
Definition:
TurboProp.h:43
RoR::AeroEngine
Definition:
AeroEngine.h:36
RoR::Turboprop::smokeNode
Ogre::SceneNode * smokeNode
Definition:
TurboProp.h:115
RoR::Turboprop::is_piston
bool is_piston
Definition:
TurboProp.h:42
RoR::Turboprop::numblades
int numblades
Definition:
TurboProp.h:109
RoR::Turboprop::getNoderef
int getNoderef()
Definition:
TurboProp.h:88
RefCountingObjectPtr< Actor >
RoR::Turboprop::flipStart
void flipStart()
Definition:
TurboProp.cpp:482
RoR::Turboprop::radius
float radius
Definition:
TurboProp.h:123
RoR::Turboprop::getRadius
float getRadius()
Definition:
TurboProp.h:92
RoR::Turboprop::indicated_torque
float indicated_torque
Definition:
TurboProp.h:44
RoR::Turboprop::debug
char debug[256]
Definition:
TurboProp.h:128
RoR::Turboprop::src_id
int src_id
Definition:
TurboProp.h:132
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition:
ForwardDeclarations.h:54
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::Turboprop
Definition:
TurboProp.h:38
RoR::Turboprop::ignition
bool ignition
Definition:
TurboProp.h:122
RoR::Turboprop::getThrottle
float getThrottle()
Definition:
TurboProp.cpp:449
RoR::AeroEngineType
AeroEngineType
Definition:
SimData.h:248
RoR::Turboprop::airdensity
float airdensity
Definition:
TurboProp.h:104
RoR::Turboprop::setThrottle
void setThrottle(float val)
Definition:
TurboProp.cpp:439
RoR::Turboprop::getIgnition
bool getIgnition()
Definition:
TurboProp.h:86
RoR::Turboprop::max_torque
float max_torque
Definition:
TurboProp.h:45
RoR::Turboprop::Turboprop
Turboprop(ActorPtr a, const char *propname, NodeNum_t nr, NodeNum_t nb, NodeNum_t np1, NodeNum_t np2, NodeNum_t np3, NodeNum_t np4, NodeNum_t tqn, float power, Ogre::String const &propfoilname, bool disable_smoke, bool ispiston, float fpitch)
Definition:
TurboProp.cpp:37
RoR::Turboprop::propwash
float propwash
Definition:
TurboProp.h:129
Application.h
Central state/object manager and communications hub.
RoR::Turboprop::isFailed
bool isFailed()
Definition:
TurboProp.h:84
RoR::Turboprop::thr_id
int thr_id
Definition:
TurboProp.h:133
RoR::Turboprop::setVisible
void setVisible(bool visible) override
Definition:
TurboProp.cpp:216
RoR::Turboprop::getReverse
bool getReverse()
Definition:
TurboProp.h:75
RoR::Turboprop::regspeed
float regspeed
Definition:
TurboProp.h:113
RoR::Turboprop::timer
float timer
Definition:
TurboProp.h:105
RoR::Turboprop::failedold
bool failedold
Definition:
TurboProp.h:125
RoR::Turboprop::getAxis
Ogre::Vector3 getAxis()
Definition:
TurboProp.h:83
RoR::Turboprop::bladewidth
float bladewidth
Definition:
TurboProp.h:110
RoR::Turboprop::twistmap
float twistmap[5]
Definition:
TurboProp.h:116
RoR::Turboprop::getRPM
float getRPM()
Definition:
TurboProp.h:79
RoR::Turboprop::nodeback
NodeNum_t nodeback
Definition:
TurboProp.h:137
RoR::Turboprop::rotenergy
double rotenergy
Definition:
TurboProp.h:117
RoR::Turboprop::getpropwash
float getpropwash()
Definition:
TurboProp.h:82
RoR::Turboprop::nodep
NodeNum_t nodep[4]
Definition:
TurboProp.h:139
RoR::Turboprop::m_actor
ActorPtr m_actor
Definition:
TurboProp.h:136
RoR::Turboprop::rpm
float rpm
Definition:
TurboProp.h:126
RoR::Turboprop::updateForces
void updateForces(float dt, int doUpdate)
Definition:
TurboProp.cpp:222
RoR::Turboprop::airfoil
Airfoil * airfoil
Definition:
TurboProp.h:101
RoR::Turboprop::GetFrontNode
NodeNum_t GetFrontNode() const override
Definition:
TurboProp.h:89
RoR::Turboprop::getWarmup
bool getWarmup()
Definition:
TurboProp.h:91
RoR::Turboprop::warmupstart
float warmupstart
Definition:
TurboProp.h:107
RoR::AeroEngineType::AE_XPROP
@ AE_XPROP
RoR::Turboprop::mod_id
int mod_id
Definition:
TurboProp.h:131
RoR::Turboprop::fixed_pitch
float fixed_pitch
Definition:
TurboProp.h:118
AeroEngine.h
RoR::Airfoil
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
Definition:
Airfoil.h:31
RoR::GfxActor
Definition:
GfxActor.h:52
RoR::Turboprop::lastflip
float lastflip
Definition:
TurboProp.h:106
RoR::Turboprop::updateVisuals
void updateVisuals(RoR::GfxActor *gfx_actor) override
Definition:
TurboProp.cpp:171
RoR::Turboprop::noderef
NodeNum_t noderef
Definition:
TurboProp.h:138
RoR::Turboprop::setIgnition
void setIgnition(bool val)
Definition:
TurboProp.h:87
RoR::Turboprop::throtle
float throtle
Definition:
TurboProp.h:127
RoR::Turboprop::reverse
bool reverse
Definition:
TurboProp.h:120
RoR::Turboprop::toggleReverse
void toggleReverse()
Definition:
TurboProp.cpp:470
RoR::Turboprop::axis
Ogre::Vector3 axis
Definition:
TurboProp.h:130
RoR::Turboprop::warmup
bool warmup
Definition:
TurboProp.h:121
RoR::Turboprop::maxrevpitch
float maxrevpitch
Definition:
TurboProp.h:112
RoR::Turboprop::failed
bool failed
Definition:
TurboProp.h:124
RoR
Definition:
AppContext.h:36
RoR::Turboprop::proparea
float proparea
Definition:
TurboProp.h:103
RoR::Turboprop::GetBackNode
NodeNum_t GetBackNode() const override
Definition:
TurboProp.h:90
Generated by
1.8.17