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
ForwardDeclarations.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 Copyright 2013-2020 Petr Ohlidal
6
7 For more information, see http://www.rigsofrods.org/
8
9 Rigs of Rods is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 3, as
11 published by the Free Software Foundation.
12
13 Rigs of Rods is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22
27
29
30#include <limits>
31#include <memory>
32#include <vector>
33
34#pragma once
35
36namespace RoR
37{
38 typedef int ActorInstanceID_t;
40
41 typedef int ScriptUnitID_t;
44
45 typedef int PointidID_t;
46 static const PointidID_t POINTIDID_INVALID = -1;
47
48 typedef int RefelemID_t;
49 static const RefelemID_t REFELEMID_INVALID = -1;
50
51 typedef int CacheEntryID_t;
53
54 typedef uint16_t NodeNum_t;
55 static const NodeNum_t NODENUM_INVALID = std::numeric_limits<NodeNum_t>::max();
56 static const NodeNum_t NODENUM_MAX = std::numeric_limits<NodeNum_t>::max() - 1;
57
58 typedef int WheelID_t;
59 static const WheelID_t WHEELID_INVALID = -1;
60
61 typedef int PropID_t;
62 static const PropID_t PROPID_INVALID = -1;
63
64 typedef int FlexbodyID_t;
66
67 typedef int FreeForceID_t;
69
70 typedef int FlareID_t;
71 static const FlareID_t FLAREID_INVALID = -1;
72
73 typedef int ExhaustID_t;
74 static const ExhaustID_t EXHAUSTID_INVALID = -1;
75
76 typedef int CParticleID_t;
78
79 typedef int CineCameraID_t;
81
82 typedef int CommandkeyID_t;
84
85 typedef int VideoCameraID_t;
87
88 typedef int ScriptRetCode_t;
89
92
93 typedef int FreeBeamGfxID_t;
95
96 typedef int BuoyCachedNodeID_t; //<! Offset to `Buoyance::buoy_cached_nodes`, use BUOYCACHEDNODEID_INVALID as empty value.
98
101
102 class Actor;
103 class ActorManager;
104 class ActorSpawner;
105 class AeroEngine;
106 class Airbrake;
107 class Airfoil;
108 class AppContext;
109 class Autopilot;
110 class Buoyance;
111 class CacheEntry;
112 class CacheSystem;
113 class CameraManager;
114 class Character;
115 class Collisions;
116 class ConfigFile;
117 class Console;
118 class ContentManager;
119 struct CurlFailInfo;
120 class CVar;
121 class DashBoard;
122 class DashBoardManager;
123 class DustPool;
124 class DiscordRpc;
125 class Engine;
126 class Flexable;
127 class FlexAirfoil;
128 class FlexBody;
129 class FlexBodyFileIO;
130 struct FlexBodyCacheData;
131 class FlexFactory;
132 class FlexMeshWheel;
133 class FlexObj;
134 class ForceFeedback;
135 class GameContext;
136 class GameScript;
137 class GfxActor;
138 struct GenericDocument;
139 struct GenericDocContext;
140 struct GfxCharacter;
141 class GfxEnvmap;
142 class GfxScene;
143 class GUIManager;
144 struct GuiManagerImpl;
145 class HydraxWater;
146 class InputEngine;
147 class IGfxWater;
148 class Landusemap;
149 class LanguageEngine;
150 class LocalStorage;
151 class MovableText;
152 class MumbleIntegration;
153 class OutGauge;
154 class OverlayWrapper;
155 class Network;
156 struct ODefDocument;
157 class OgreSubsystem;
158 struct OTCDocument;
159 struct PlatformUtils;
160 class PointColDetector;
161 class ProceduralManager;
162 struct ProceduralObject;
163 struct ProceduralPoint;
164 class ProceduralRoad;
165 struct Prop;
166 struct PropAnim;
167 class RailGroup;
168 class Renderdash;
169 class Replay;
170 class RigLoadingProfiler;
171 class Screwprop;
172 class ScriptEngine;
173 class ShadowManager;
174 class Skidmark;
175 class SkidmarkConfig;
176 struct SkinDocument;
177 class SkinManager;
178 class SkyManager;
179 class SkyXManager;
180 class SlideNode;
181 class Sound;
182 class SoundManager;
184 class SoundScriptManager;
186 class Task;
187 class TerrainEditor;
189 class Terrain;
192 struct Terrn2Author;
193 struct Terrn2Document;
194 class Terrn2Parser;
195 struct Terrn2Telepoint;
196 class ThreadPool;
197 struct TObjDocument;
198 class TorqueCurve;
199 struct TuneupDef;
200 class VehicleAI;
201 class VideoCamera;
202
203 // SimData.h
204 struct node_t;
205 struct beam_t;
206 struct shock_t;
207 struct eventsource_t;
208 struct soundsource_t;
209 struct rigidifier_t;
210 struct wheel_t;
211 struct vwheel_t;
212 struct ropable_t;
213 struct wing_t;
214 struct command_t;
215 struct rotator_t;
216 struct flare_t;
217 struct rope_t;
218 struct Exhaust;
219 struct CParticle;
220 struct collision_box_t;
221 struct tie_t;
222 struct hook_t;
223 struct ground_model_t;
224 struct client_t;
225 struct authorinfo_t;
226
227 // File formats - see also separate `RigDef` namespace below.
228 typedef std::shared_ptr<ODefDocument> ODefDocumentPtr;
229 typedef std::shared_ptr<OTCDocument> OTCDocumentPtr;
230 typedef std::shared_ptr<SkinDocument> SkinDocumentPtr;
231 typedef std::shared_ptr<TObjDocument> TObjDocumentPtr;
232 typedef std::shared_ptr<Terrn2Document> Terrn2DocumentPtr;
233
255
256 typedef std::vector<ActorPtr> ActorPtrVec;
257 typedef std::vector<TerrainEditorObjectPtr> TerrainEditorObjectPtrVec;
258 typedef std::vector<CacheEntryPtr> CacheEntryPtrVec;
259
260 namespace GUI
261 {
262 class ConsoleView;
263 class Dialog;
264 class FrictionSettings;
265 class GameControls;
266 class GameMainMenu;
267 class LoadingWindow;
268 class MainSelector;
269 class MpClientList;
271 class RepositorySelector;
272 class DirectionArrow;
273 class SceneMouse;
274 class SurveyMap;
275 class TopMenubar;
276 class VehicleInfoTPanel;
277 }
278} // namespace RoR
279
280namespace RoRnet
281{
282 struct Header;
283 struct UserInfo;
284 struct StreamRegister;
285 struct ActorStreamRegister;
286 struct ServerInfo;
287 struct VehicleState;
288}
289
290namespace RigDef
291{
292 struct Document;
293 typedef std::shared_ptr<Document> DocumentPtr;
294}
295
296#ifdef USE_SOCKETW
297class SWBaseSocket;
298#endif // USE_SOCKETW
Softbody object; can be anything from soda can to a space shuttle Constructed from a truck definition...
Definition Actor.h:55
Builds and manages softbody actors (physics on background thread, networking)
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
Definition Airfoil.h:32
Central setup and event handler for input/windowing/rendering.
Definition AppContext.h:47
Quake-style console variable, defined in RoR.cfg or crated via Console UI and scripts.
Definition CVar.h:53
Definition CacheSystem.h:56
A content database MOTIVATION: RoR users usually have A LOT of content installed.
Adds direct parsing of custom types.
Definition ConfigFile.h:38
Global game console backend.
Definition Console.h:41
Wrapper class, just for code consistency with other subsystems.
Definition DiscordRpc.h:31
A land vehicle engine + transmission.
Definition Engine.h:42
Enables saving and loading flexbodies from/to binary file.
Definition FlexFactory.h:98
Flexbody = A deformable mesh; updated on CPU every frame, then uploaded to video memory.
Definition FlexBody.h:44
Consists of static mesh, representing the rim, and dynamic mesh, representing the tire.
A visual mesh, forming a chassis for softbody actor At most one instance is created per actor.
Definition FlexObj.h:60
In-game map widget Has 3 display modes (see SurveyMapMode), cycled using input SURVEY_MAP_TOGGLE_VIEW
Central game state manager.
Definition GameContext.h:96
Proxy class that can be called by script functions.
Definition GameScript.h:42
A dynamic environment probe; Creates a cubemap with realtime reflections around specified point.
Provides a 3D graphical representation of the simulation Idea: simulation runs at it's own constant r...
Definition GfxScene.h:47
Manages controller configuration, evaluates input events.
A class that allows scripts to store data persistently.
'renderdash' is a name of a classic Render-To-Texture animated material with gauges and other dashboa...
Definition Renderdash.h:35
This class represents the angelscript scripting interface.
< Skidmark config file parser and data container
Definition Skidmark.h:33
/brief Handle for a task executed by ThreadPool
Definition ThreadPool.h:45
Minimalist editor mode; orig.
Represents an instance of static terrain object (.ODEF file format)
this class handles all interactions with the Ogre Terrain system
Facilitates execution of (small) tasks on separate threads.
Definition ThreadPool.h:105
This class loads and processes a torque curve for a vehicle.
Definition TorqueCurve.h:43
std::shared_ptr< Document > DocumentPtr
static const CacheEntryID_t CACHEENTRYID_INVALID
static const NodeNum_t NODENUM_INVALID
RefCountingObjectPtr< ProceduralManager > ProceduralManagerPtr
std::shared_ptr< TObjDocument > TObjDocumentPtr
std::vector< ActorPtr > ActorPtrVec
RefCountingObjectPtr< LocalStorage > LocalStoragePtr
static const PointidID_t POINTIDID_INVALID
int ActorInstanceID_t
Unique sequentially generated ID of an actor in session. Use ActorManager::GetActorById()
int CineCameraID_t
Index into Actor::ar_cinecam_node and Actor::ar_camera_node_* arrays; use RoR::CINECAMERAID_INVALID a...
int FreeForceID_t
Unique sequentially generated ID of FreeForce; use ActorManager::GetFreeForceNextId().
RefCountingObjectPtr< Terrain > TerrainPtr
RefCountingObjectPtr< Screwprop > ScrewpropPtr
std::shared_ptr< Terrn2Document > Terrn2DocumentPtr
RefCountingObjectPtr< Engine > EnginePtr
int TerrainEditorObjectID_t
Offset into RoR::TerrainObjectManager::m_editor_objects, use RoR::TERRAINEDITOROBJECTID_INVALID as em...
static const FreeBeamGfxID_t FREEBEAMGFXID_INVALID
static const RepoFileInstallRequestID_t REPOFILEINSTALLREQUESTID_INVALID
Invalid ID for repository item installation request.
int CacheEntryID_t
index to CacheSystem::m_cache_entries, use RoR::CACHEENTRYNUM_INVALID as empty value.
int RepoFileInstallRequestID_t
Unique sequentially generated ID of a repository item installation request; use GUI::RepositorySelect...
RefCountingObjectPtr< ProceduralObject > ProceduralObjectPtr
static const CParticleID_t CPARTICLEID_INVALID
RefCountingObjectPtr< ProceduralRoad > ProceduralRoadPtr
RefCountingObjectPtr< TerrainEditorObject > TerrainEditorObjectPtr
RefCountingObjectPtr< ProceduralPoint > ProceduralPointPtr
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
int ScriptRetCode_t
see enum RoR::ScriptRetCode - combines AngelScript codes and RoR internal codes.
int RefelemID_t
index to PointColDetector::m_ref_list, use RoR::REFELEMID_INVALID as empty value.
int ScriptUnitID_t
Unique sequentially generated ID of a loaded and running scriptin session. Use ScriptEngine::getScrip...
static const ActorInstanceID_t ACTORINSTANCEID_INVALID
std::vector< CacheEntryPtr > CacheEntryPtrVec
static const WheelID_t WHEELID_INVALID
static const CineCameraID_t CINECAMERAID_INVALID
RefCountingObjectPtr< Actor > ActorPtr
static const ScriptUnitID_t SCRIPTUNITID_INVALID
int CommandkeyID_t
Index into Actor::ar_commandkeys (BEWARE: indexed 1-MAX_COMMANDKEYS, 0 is invalid value,...
std::shared_ptr< OTCDocument > OTCDocumentPtr
int VideoCameraID_t
Index into GfxActor::m_videocameras, use RoR::VIDEOCAMERAID_INVALID as empty value.
RefCountingObjectPtr< SoundScriptInstance > SoundScriptInstancePtr
RefCountingObjectPtr< AeroEngine > AeroEnginePtr
int PropID_t
Index to GfxActor::m_props, use RoR::PROPID_INVALID as empty value.
int FlareID_t
Index into Actor::ar_flares, use RoR::FLAREID_INVALID as empty value.
int ExhaustID_t
Index into GfxActor::m_exhausts, use RoR::EXHAUSTID_INVALID as empty value.
static const NodeNum_t NODENUM_MAX
std::shared_ptr< ODefDocument > ODefDocumentPtr
RefCountingObjectPtr< TuneupDef > TuneupDefPtr
static const FlareID_t FLAREID_INVALID
RefCountingObjectPtr< SoundScriptTemplate > SoundScriptTemplatePtr
RefCountingObjectPtr< GenericDocContext > GenericDocContextPtr
int BuoyCachedNodeID_t
int FlexbodyID_t
Index to GfxActor::m_flexbodies, use RoR::FLEXBODYID_INVALID as empty value.
RefCountingObjectPtr< DashBoardManager > DashBoardManagerPtr
RefCountingObjectPtr< GenericDocument > GenericDocumentPtr
std::vector< TerrainEditorObjectPtr > TerrainEditorObjectPtrVec
RefCountingObjectPtr< VehicleAI > VehicleAIPtr
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
RefCountingObjectPtr< Autopilot > AutopilotPtr
static const BuoyCachedNodeID_t BUOYCACHEDNODEID_INVALID
RefCountingObjectPtr< CacheEntry > CacheEntryPtr
static const CommandkeyID_t COMMANDKEYID_INVALID
std::shared_ptr< SkinDocument > SkinDocumentPtr
static const ExhaustID_t EXHAUSTID_INVALID
static const PropID_t PROPID_INVALID
int FreeBeamGfxID_t
Index into GfxScene::m_gfx_freebeams, use RoR::FREEBEAMGFXID_INVALID as empty value.
static const VideoCameraID_t VIDEOCAMERAID_INVALID
int CParticleID_t
Index into GfxActor::m_cparticles, use RoR::CPARTICLEID_INVALID as empty value.
static const ScriptUnitID_t SCRIPTUNITID_DEFAULT
The script defined in .terrn2 [Scripts], or 'default.as' ~ classic behavior.
static const FlexbodyID_t FLEXBODYID_INVALID
int PointidID_t
index to PointColDetector::hit_pointid_list, use RoR::POINTIDID_INVALID as empty value.
static const FreeForceID_t FREEFORCEID_INVALID
static const TerrainEditorObjectID_t TERRAINEDITOROBJECTID_INVALID
RefCountingObjectPtr< Sound > SoundPtr
static const RefelemID_t REFELEMID_INVALID
Configurable console renderer, implements filtering, colorized text, incons.
Rembember OGRE coordinates are {X = right/left, Y = up/down, Z = front/back}.
A mesh attached to vehicle frame via 3 nodes.
Definition GfxData.h:156
A series of RailSegment-s for SlideNode to slide along. Can be closed in a loop.
Definition SlideNode.h:54
< Teleport drop location
Dual purpose:
An Ogre::Camera mounted on the actor and rendering into either in-scene texture or external window.
Definition GfxData.h:215
Simulation: An edge in the softbody structure.
Definition SimData.h:305
< Scripting
Definition Collisions.h:41
Surface friction properties.
Definition SimData.h:704
Physics: A vertex in the softbody structure.
Definition SimData.h:260
< Must preserve mem. layout of RoRnet::StreamRegister
Definition RoRnet.h:170
< Common header for every packet
Definition RoRnet.h:152
< Sent from the client to server and vice versa, to broadcast a new stream
Definition RoRnet.h:160
< Formerly oob_t
Definition RoRnet.h:208