RigsofRods
Soft-body Physics Simulation
ScrewProp.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 #include "SimData.h"
25 
26 namespace RoR {
27 
30 
33 
34 class Screwprop
35 {
36 public:
37 
39 
40  void updateForces(int update);
41  void setThrottle(float val);
42  void setRudder(float val);
43  float getThrottle();
44  float getRudder();
45  void reset();
46  void toggleReverse();
47 
48 private:
49 
51  bool reverse;
52  float fullpower;
53  float rudder;
54  float throtle;
55 
56  // Attachment
61 };
62 
65 
66 } // namespace RoR
67 
RoR::Screwprop::nodeback
NodeNum_t nodeback
Definition: ScrewProp.h:58
RoR::Screwprop::reset
void reset()
Definition: ScrewProp.cpp:111
RoR::DustPool
Definition: DustPool.h:33
RoR::Screwprop::m_actor
ActorPtr m_actor
Definition: ScrewProp.h:57
RoR::Screwprop::ripplep
DustPool * ripplep
Definition: ScrewProp.h:50
RoR::Screwprop::fullpower
float fullpower
in HP
Definition: ScrewProp.h:52
RoR::Screwprop::setRudder
void setRudder(float val)
Definition: ScrewProp.cpp:89
RefCountingObjectPtr< Actor >
RoR::Screwprop::nodeup
NodeNum_t nodeup
Definition: ScrewProp.h:60
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::Screwprop::Screwprop
Screwprop(ActorPtr actor, NodeNum_t noderef, NodeNum_t nodeback, NodeNum_t nodeup, float power)
Definition: ScrewProp.cpp:37
RoR::Screwprop::rudder
float rudder
Definition: ScrewProp.h:53
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::Screwprop::setThrottle
void setThrottle(float val)
Definition: ScrewProp.cpp:76
Application.h
Central state/object manager and communications hub.
RoR::Screwprop::noderef
NodeNum_t noderef
Definition: ScrewProp.h:59
RoR::Screwprop::getRudder
float getRudder()
Definition: ScrewProp.cpp:106
RoR::Screwprop::splashp
DustPool * splashp
Definition: ScrewProp.h:50
RoR::Screwprop
Definition: ScrewProp.h:34
RoR::Screwprop::throtle
float throtle
Definition: ScrewProp.h:54
RoR::Screwprop::getThrottle
float getThrottle()
Definition: ScrewProp.cpp:98
RoR::Screwprop::reverse
bool reverse
Definition: ScrewProp.h:51
RoR::Screwprop::updateForces
void updateForces(int update)
Definition: ScrewProp.cpp:49
RoR
Definition: AppContext.h:36
RoR::Screwprop::toggleReverse
void toggleReverse()
Definition: ScrewProp.cpp:118