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
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 "RefCountingObject.h"
26#include "SimData.h"
27
28namespace RoR {
29
32
35
36class Screwprop : public RefCountingObject<Screwprop>
37{
38public:
39
41 virtual ~Screwprop() override;
42
43 void updateForces(int update);
44 void setThrottle(float val);
45 void setRudder(float val);
46 float getThrottle();
47 float getRudder();
48 float getMaxPower() { return fullpower; }
49 bool getReverse() { return reverse; }
50 void reset();
51 void toggleReverse();
52
53 NodeNum_t GetRefNode() const { return noderef; };
54 NodeNum_t GetBackNode() const { return nodeback; };
55 NodeNum_t GetUpNode() const { return nodeup; };
56
57private:
58
60 bool reverse;
61 float fullpower;
62 float rudder;
63 float throtle;
64
65 // Attachment
70};
71
74
75} // namespace RoR
76
Central state/object manager and communications hub.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
Self reference-counting objects, as requred by AngelScript garbage collector.
ActorPtr m_actor
Definition ScrewProp.h:66
float getMaxPower()
Definition ScrewProp.h:48
float fullpower
in HP
Definition ScrewProp.h:61
virtual ~Screwprop() override
Definition ScrewProp.cpp:49
NodeNum_t GetBackNode() const
Definition ScrewProp.h:54
DustPool * ripplep
Definition ScrewProp.h:59
NodeNum_t GetRefNode() const
Definition ScrewProp.h:53
void toggleReverse()
NodeNum_t GetUpNode() const
Definition ScrewProp.h:55
void updateForces(int update)
Definition ScrewProp.cpp:54
bool getReverse()
Definition ScrewProp.h:49
DustPool * splashp
Definition ScrewProp.h:59
NodeNum_t noderef
Definition ScrewProp.h:68
NodeNum_t nodeback
Definition ScrewProp.h:67
NodeNum_t nodeup
Definition ScrewProp.h:69
float getRudder()
void setRudder(float val)
Definition ScrewProp.cpp:94
float getThrottle()
void setThrottle(float val)
Definition ScrewProp.cpp:81
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.