Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
RigDef_File.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-2024 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
40#pragma once
41
42#include "Application.h"
43#include "BitFlags.h"
44#include "RigDef_Node.h"
45#include "SimConstants.h"
46
47#include <list>
48#include <memory>
49#include <vector>
50#include <string>
51#include <OgreString.h>
52#include <OgreVector3.h>
53#include <OgreStringConverter.h>
54
55namespace RigDef {
56
57extern const char* ROOT_MODULE_NAME;
58
59// --------------------------------
60// Enums which only carry value
61
77
86
87// --------------------------------
88// Enums which specify option letters/numbers and also carry value
89
90enum class EngineType
91{
92 c_CAR = 'c',
93 e_ECAR = 'e',
94 t_TRUCK = 't',
95};
96
97enum class DifferentialType: char
98{
99 o_OPEN = 'o',
100 l_LOCKED = 'l',
101 s_SPLIT = 's',
102 v_VISCOUS = 'v'
103};
104
105typedef std::vector<DifferentialType> DifferentialTypeVec;
106
107enum class MinimassOption: char
108{
109 n_DUMMY = 'n',
110 l_SKIP_LOADED = 'l'
111};
112
113enum class WingControlSurface: char
114{
115 n_NONE = 'n',
116 a_RIGHT_AILERON = 'a',
117 b_LEFT_AILERON = 'b',
118 f_FLAP = 'f',
119 e_ELEVATOR = 'e',
120 r_RUDDER = 'r',
123 c_RIGHT_ELEVON = 'c',
124 d_LEFT_ELEVON = 'd',
125 g_RIGHT_FLAPERON = 'g',
126 h_LEFT_FLAPERON = 'h',
130 j_LEFT_RUDDERVATOR = 'j',
131};
132
133// --------------------------------
134// Enums which only specify flag letters, values are carried by bit masks
135
136enum class TieOption: char
137{
138 n_DUMMY = 'n',
139 v_DUMMY = 'v',
140 i_INVISIBLE = 'i',
141 s_NO_SELF_LOCK = 's',
142};
143
144enum class CabOption: char
145{
146 n_DUMMY = 'n',
147 c_CONTACT = 'c',
148 b_BUOYANT = 'b',
149 p_10xTOUGHER = 'p',
150 u_INVULNERABLE = 'u',
151 s_BUOYANT_NO_DRAG = 's',
153 D_CONTACT_BUOYANT = 'D',
156};
157
158enum class TriggerOption: char
159{
160 i_INVISIBLE = 'i',
161 c_COMMAND_STYLE = 'c',
162 x_START_DISABLED = 'x',
163 b_KEY_BLOCKER = 'b',
164 B_TRIGGER_BLOCKER = 'B',
166 s_CMD_NUM_SWITCH = 's',
168 H_LOCKS_HOOK_GROUP = 'H',
169 t_CONTINUOUS = 't',
170 E_ENGINE_TRIGGER = 'E',
171};
172
173enum class BeamOption: char
174{
175 v_DUMMY = 'v',
176 i_INVISIBLE = 'i',
177 r_ROPE = 'r',
178 s_SUPPORT = 's',
179};
180
181enum class HydroOption: char
182{
183 n_INPUT_NORMAL = 'n',
184 j_INVISIBLE = 'j',
186 // Useful for trucks
188 // Useful for planes: These can be used to control flight surfaces, or to create a thrust vectoring system.
189 a_INPUT_AILERON = 'a',
190 r_INPUT_RUDDER = 'r',
191 e_INPUT_ELEVATOR = 'e',
198};
199
200enum class ShockOption: char
201{
202 n_DUMMY = 'n',
203 v_DUMMY = 'v',
204 i_INVISIBLE = 'i',
205 L_ACTIVE_LEFT = 'L',
206 R_ACTIVE_RIGHT = 'R',
207 m_METRIC = 'm',
208};
209
210enum class Shock2Option: char
211{
212 n_DUMMY = 'n',
213 v_DUMMY = 'v',
214 i_INVISIBLE = 'i',
215 s_SOFT_BUMP_BOUNDS = 's',
216 m_METRIC = 'm',
217 M_ABSOLUTE_METRIC = 'M',
218};
219
220enum class Shock3Option: char
221{
222 n_DUMMY = 'n',
223 v_DUMMY = 'v',
224 i_INVISIBLE = 'i',
225 m_METRIC = 'm',
226 M_ABSOLUTE_METRIC = 'M',
227};
228
229enum class NodeOption: char
230{
231 n_DUMMY = 'n',
232 m_NO_MOUSE_GRAB = 'm',
233 f_NO_SPARKS = 'f',
234 x_EXHAUST_POINT = 'x',
237 h_HOOK_POINT = 'h',
239 b_EXTRA_BUOYANCY = 'b',
240 p_NO_PARTICLES = 'p',
241 L_LOG = 'L',
242 l_LOAD_WEIGHT = 'l',
243};
244
245// --------------------------------
246// Shared/helper rig definition data
247
248struct AeroAnimator // used by Animator
249{
251 static const BitMask_t OPTION_RPM = BITMASK(2);
252 static const BitMask_t OPTION_TORQUE = BITMASK(3);
253 static const BitMask_t OPTION_PITCH = BITMASK(4);
254 static const BitMask_t OPTION_STATUS = BITMASK(5);
255
257 unsigned int engine_idx = 0u;
258};
259
261{
262 std::string filename;
263};
264
278
279struct BaseMeshWheel: public BaseWheel // common to 'meshwheels' and 'meshwheels2'
280{
282 Ogre::String mesh_name;
283 Ogre::String material_name;
284 float rim_radius = 0.f;
285 float tyre_radius = 0.f;
286 float spring;
287 float damping;
288};
289
290struct BaseWheel2: public BaseWheel // common to 'wheels2' and 'flexbodywheels'
291{
292 float rim_radius = 0.f;
293 float tyre_radius = 0.f;
294 float tyre_springiness = 0.f;
295 float tyre_damping = 0.f;
296};
297
299{
304
307 Ogre::String start_function;
308 Ogre::String stop_function;
309};
310
312{
313 std::string comment_text;
314 // The item following after the comment.
317};
318
319// --------------------------------
320// Rig definition data for individual elements
321
340
342{
344 {
345 // > aeroengines
351 // > forward gears (hack...)
353
355 unsigned int motor = 0;
356 };
357
358 // Source flags
397
398 // Mode flags
402 static const BitMask_t MODE_OFFSET_X = BITMASK(4);
403 static const BitMask_t MODE_OFFSET_Y = BITMASK(5);
404 static const BitMask_t MODE_OFFSET_Z = BITMASK(6);
406 static const BitMask_t MODE_NO_FLIP = BITMASK(8);
407 static const BitMask_t MODE_BOUNCE = BITMASK(9);
409
410 float ratio = 0.f;
411 float lower_limit = -1.f;
412 float upper_limit = -1.f;
414 std::list<MotorSource> motor_sources;
416 Ogre::String event_name;
417 Ogre::String dash_link_name;
418
419 void AddMotorSource(BitMask_t source, unsigned int motor);
420};
421
423{
424 static const BitMask_t OPTION_VISIBLE = BITMASK( 1);
432 static const BitMask_t OPTION_FLAP = BITMASK( 9);
434 static const BitMask_t OPTION_ROLL = BITMASK(11);
435 static const BitMask_t OPTION_PITCH = BITMASK(12);
436 static const BitMask_t OPTION_BRAKES = BITMASK(13);
437 static const BitMask_t OPTION_ACCEL = BITMASK(14);
438 static const BitMask_t OPTION_CLUTCH = BITMASK(15);
439 static const BitMask_t OPTION_SPEEDO = BITMASK(16);
440 static const BitMask_t OPTION_TACHO = BITMASK(17);
441 static const BitMask_t OPTION_TURBO = BITMASK(18);
442 static const BitMask_t OPTION_PARKING = BITMASK(19);
447 static const BitMask_t OPTION_TORQUE = BITMASK(24);
453
457 float short_limit = 0.f;
458 float long_limit = 0.f;
460 std::shared_ptr<Inertia> inertia_defaults;
461 std::shared_ptr<BeamDefaults> beam_defaults;
463};
464
476
477struct Author
478{
479 Ogre::String type;
480 unsigned int forum_account_id = 0;
481 Ogre::String name;
482 Ogre::String email;
483 bool _has_forum_account = false;
484};
485
491
492struct Beam
493{
495 static const BitMask_t OPTION_r_ROPE = BITMASK(2);
497
503 std::shared_ptr<BeamDefaults> defaults;
504};
505
520
567
568struct Brakes
569{
570 float default_braking_force = 30000.f;
572};
573
589
596
598{
599 std::vector<Node::Ref> nodes;
600};
601
606
608{
609 Ogre::Vector3 position = Ogre::Vector3::ZERO;
611 float spring = 8000.f;
612 float damping = 800.f;
613 float node_mass = 20.f;
614 std::shared_ptr<BeamDefaults> beam_defaults;
615 std::shared_ptr<NodeDefaults> node_defaults;
616};
617
619{
620 std::vector<Node::Ref> nodes;
621};
622
624{
626};
627
628struct Command2 // 'commands' are auto-imported as 'commands2' (only 1 extra argument)
629{
631 float shorten_rate = 0.f;
632 float lengthen_rate = 0.f;
633 float max_contraction = 0.f;
634 float max_extension = 0.f;
637 Ogre::String description;
639 float affect_engine = 1.f;
640 bool needs_engine = true;
641 bool plays_sound = true;
642 std::shared_ptr<BeamDefaults> beam_defaults;
643 std::shared_ptr<Inertia> inertia_defaults;
645
646 bool option_i_invisible = false;
647 bool option_r_rope = false;
650 bool option_p_1press = false;
652};
653
655{
656 float min_speed = 0.f;
657 int autobrake = 0;
658};
659
661{
662 Ogre::String name;
664};
665
670
672{
673 std::string skin_name;
674};
675
676struct Engine
677{
678 float shift_down_rpm = 0.f;
679 float shift_up_rpm = 0.f;
680 float torque = 0.f;
681 float global_gear_ratio = 0.f;
684 std::vector<float> gear_ratios;
685};
686
688{
689 float inertia = 10.f;
691 float clutch_force = -1.f;
692 float shift_time = -1.f;
693 float clutch_time = -1.f;
694 float post_shift_time = -1.f;
695 float idle_rpm = -1.f;
696 float stall_rpm = -1.f;
697 float max_idle_mixture = -1.f;
698 float min_idle_mixture = -1.f;
699 float braking_torque = -1.f;
700};
701
703{
704 Engturbo();
705
709 float param1;
710 float param2;
711 float param3;
712 float param4;
713 float param5;
714 float param6;
715 float param7;
716 float param8;
717 float param9;
718 float param10;
719 float param11;
720};
721
728
734
736{
737 int version = -1;
738};
739
741{
742 Ogre::String unique_id;
743 int category_id = -1;
745};
746
748{
752 Ogre::Vector3 offset = Ogre::Vector3(0, 0, 1); // Note `offset.z` is only used by flares2+
754 int control_number = -1;
755 std::string dashboard_link;
757 float size = -1.f;
758 Ogre::String material_name;
759};
760
761struct Flare2 : public FlareBase // Note 'flares' are auto-imported as 'flares2' (only 1 extra argument)
762{
763};
764
765struct Flare3: public FlareBase
766{
767 std::shared_ptr<Inertia> inertia_defaults;
768};
769
775
778{
782 int vert_index{ 0 };
783 int line_number{ 0 }; // If multiple verts are given on single 'forvert' line, multiple `Forvert` entries are inserted.
784};
785
787{
791 Ogre::Vector3 offset = Ogre::Vector3::ZERO;
792 Ogre::Vector3 rotation = Ogre::Vector3::ZERO;
793 Ogre::String mesh_name;
794 std::list<Animation> animations;
795 std::vector<Node::Range> node_list_to_import;
796 std::vector<Node::Ref> node_list;
797 std::vector<Forvert> forvert;
799};
800
809
821
823{
824 float dry_mass = 0;
825 float cargo_mass = 0;
826 Ogre::String material_name;
827};
828
829struct Guid
830{
831 std::string guid;
832};
833
835{
836 std::string key;
837 std::string value;
838};
839
840struct Help
841{
842 std::string material;
843};
844
863
864struct Hydro
865{
867 // Useful for trucks:
869 // Useful for planes: These can be used to control flight surfaces, or to create a thrust vectoring system.
879 // Generic steering input
881
886 std::shared_ptr<Inertia> inertia_defaults;
887 std::shared_ptr<BeamDefaults> beam_defaults;
889};
890
892{
893 int a1 = 0;
894 int a2 = 0;
896};
897
899{
900 // TODO remove these, use SimConstants.h
901 static const int LOCKGROUP_DEFAULT = -1;
902 static const int LOCKGROUP_NOLOCK = 9999;
903
904 int number = 0;
905 std::vector<Node::Ref> nodes;
906};
907
909{
910 bool double_sided = false;
911};
912
924
926{
927 unsigned int flare_number = 0;
928 Ogre::String material_name;
929};
930
936
938{};
939
941{};
942
944{
945 NodeDefaults();
946
948 float friction;
949 float volume;
950 float surface;
951 unsigned int options;
952};
953
960
971
972struct Prop
973{
975 {
977 offset(Ogre::Vector3::ZERO), // Default depends on right/left-hand dashboard placement
978 rotation_angle(160.f),
979 _offset_is_set(false),
980 mesh_name("dirwheel.mesh")
981 {}
982
983 Ogre::Vector3 offset;
986 Ogre::String mesh_name;
987 };
988
990 {
992 color(1.0, 0.5, 0.0),
993 flare_material_name("tracks/beaconflare")
994 {}
995
997 Ogre::ColourValue color;
998 };
999
1003 Ogre::Vector3 offset = Ogre::Vector3::ZERO;
1004 Ogre::Vector3 rotation = Ogre::Vector3::ZERO;
1005 Ogre::String mesh_name;
1006 std::list<Animation> animations;
1011};
1012
1014{
1015 unsigned int id = 0;
1016 std::vector<Node::Range> node_list;
1017};
1018
1020{
1022 int group = -1; // = value not set
1023 bool has_multilock = false;
1024};
1025
1026struct Rope
1027{
1030 bool invisible = false;
1031 std::shared_ptr<BeamDefaults> beam_defaults;
1033};
1034
1036{
1040 float rate = 0.f;
1041 unsigned int spin_left_key = 0;
1042 unsigned int spin_right_key = 0;
1044 std::shared_ptr<Inertia> inertia_defaults;
1045 float engine_coupling = 1.f;
1046 bool needs_engine = false;
1047};
1048
1049struct Rotator2: public Rotator
1050{
1051 float rotating_force = 10000000.f;
1052 float tolerance = 0.f;
1053 Ogre::String description;
1054};
1055
1063
1065{
1066 std::string filename;
1067};
1068
1070{
1072};
1073
1074struct Shock
1075{
1080
1082 float spring_rate = 0.f;
1083 float damping = 0.f;
1084 float short_bound = 0.f;
1085 float long_bound = 0.f;
1086 float precompression = 1.f;
1088 std::shared_ptr<BeamDefaults> beam_defaults;
1090};
1091
1093{
1094 Shock2();
1095
1097 static const BitMask_t OPTION_s_SOFT_BUMP_BOUNDS = BITMASK(2); // soft bump boundaries, use when shocks reach limiters too often and "jumprebound" (default is hard bump boundaries)
1098 static const BitMask_t OPTION_m_METRIC = BITMASK(3); // metric values for shortbound/longbound applying to the length of the beam.
1099 static const BitMask_t OPTION_M_ABSOLUTE_METRIC = BITMASK(4); // Absolute metric values for shortbound/longbound, settings apply without regarding to the original length of the beam.(Use with caution, check ror.log for errors)
1100
1103 float damp_in;
1107 float damp_out;
1114 std::shared_ptr<BeamDefaults> beam_defaults;
1116};
1117
1119{
1120 Shock3();
1121
1123 static const BitMask_t OPTION_m_METRIC = BITMASK(2); // metric values for shortbound/longbound applying to the length of the beam.
1124 static const BitMask_t OPTION_M_ABSOLUTE_METRIC = BITMASK(3); // Absolute metric values for shortbound/longbound, settings apply without regarding to the original length of the beam.(Use with caution, check ror.log for errors)
1125
1128 float damp_in;
1130 float damp_out;
1141 std::shared_ptr<BeamDefaults> beam_defaults;
1143};
1144
1150
1152{
1157
1159 std::vector<Node::Range> rail_node_ranges;
1161
1162 // Optional args
1163 float spring_rate=0.f; bool _spring_rate_set=false;
1164 float break_force=0.f; bool _break_force_set=false;
1165 float tolerance=0.f; bool _tolerance_set=false;
1169};
1170
1172{
1174 Ogre::String sound_script_name;
1175};
1176
1178{
1179 static const int MODE_ALWAYS = -2;
1180 static const int MODE_EXTERIOR = -1;
1181
1183};
1184
1186{
1187 float max_speed = 0.f;
1188 bool is_enabled = false;
1189};
1190
1191struct Texcoord; // needed by Submesh
1192
1194{
1195 bool backmesh = false;
1196 std::vector<Texcoord> texcoords;
1197 std::vector<Cab> cab_triangles;
1198};
1199
1201{
1203 float u = 0.f;
1204 float v = 0.f;
1205};
1206
1207struct Tie
1208{
1211
1213 float max_reach_length = 0.f;
1215 float min_length = 0.f;
1216 float max_length = 0.f;
1218 float max_stress = 100000.0f;
1219 std::shared_ptr<BeamDefaults> beam_defaults;
1221 int group = -1;
1222};
1223
1225{
1226 struct Sample
1227 {
1229 power(0),
1231 {}
1232
1233 float power;
1235 };
1236
1237 std::vector<Sample> samples;
1239};
1240
1253
1255{
1256 int a1 = 0;
1257 int a2 = -1;
1258 bool has_2wd = true;
1259 bool has_2wd_lo = false;
1260 std::vector<float> gear_ratios = {1.0f};
1261};
1262
1287
1300
1310
1330
1331struct Wheel: public BaseWheel
1332{
1333 float radius = 0.f;
1334 float springiness = 0.f;
1335 float damping = 0.f;
1336 Ogre::String face_material_name = "tracks/wheelface";
1337 Ogre::String band_material_name = "tracks/wheelband1";
1338};
1339
1340struct Wheel2: public BaseWheel2
1341{
1342 float rim_springiness = 0.f;
1343 float rim_damping = 0.f;
1344 Ogre::String face_material_name = "tracks/wheelface";
1345 Ogre::String band_material_name = "tracks/wheelband1";
1346};
1347
1349{
1350 int wheel_id = 0;
1352};
1353
1354struct Wing
1355{
1357 float tex_coords[8] = {};
1359 float chord_point = -1.f;
1360 float min_deflection = -1.f;
1361 float max_deflection = -1.f;
1362 Ogre::String airfoil;
1363 float efficacy_coef = 1.f; // So-called 'liftcoef'.
1364};
1365
1366// --------------------------------
1367// The document
1368
1370{
1371 struct Module // represents 'section/end_section'. Also use by 'addonparts' system.
1372 {
1373 Module(Ogre::String const & name);
1374
1375 Ogre::String name;
1377
1378 std::vector<Airbrake> airbrakes;
1379 std::vector<Animator> animators;
1380 std::vector<AntiLockBrakes> antilockbrakes;
1381 std::vector<Assetpack> assetpacks;
1382 std::vector<Author> author;
1383 std::vector<Axle> axles;
1384 std::vector<Beam> beams;
1385 std::vector<Brakes> brakes;
1386 std::vector<Camera> cameras;
1387 std::vector<CameraRail> camerarail;
1388 std::vector<CollisionBox> collisionboxes;
1389 std::vector<Cinecam> cinecam;
1390 std::vector<Command2> commands2; // 'commands' are auto-imported as 'commands2' (only 1 extra argument)
1391 std::vector<CruiseControl> cruisecontrol;
1392 std::vector<Node::Ref> contacters;
1393 std::vector<CustomDashboardInput> customdashboardinputs;
1394 std::vector<DefaultSkin> default_skin;
1395 std::vector<Ogre::String> description;
1396 std::vector<Engine> engine;
1397 std::vector<Engoption> engoption;
1398 std::vector<Engturbo> engturbo;
1399 std::vector<Exhaust> exhausts;
1400 std::vector<ExtCamera> extcamera;
1401 std::vector<FileFormatVersion> fileformatversion;
1402 std::vector<Node::Ref> fixes;
1403 std::vector<Fileinfo> fileinfo;
1404 std::vector<Flare2> flares2; // 'flares' are auto-imported as 'flares2' (only 1 extra argument)
1405 std::vector<Flare3> flares3;
1406 std::vector<FlaregroupNoImport> flaregroups_no_import;
1407 std::vector<Flexbody> flexbodies;
1408 std::vector<FlexBodyWheel> flexbodywheels;
1409 std::vector<Fusedrag> fusedrag;
1410 std::vector<Globals> globals;
1411 std::vector<Guid> guid;
1412 std::vector<GuiSettings> guisettings;
1413 std::vector<Help> help;
1414 std::vector<Hook> hooks;
1415 std::vector<Hydro> hydros;
1416 std::vector<InterAxle> interaxles;
1417 std::vector<Lockgroup> lockgroups;
1418 std::vector<ManagedMaterial> managedmaterials;
1419 std::vector<MaterialFlareBinding> materialflarebindings;
1420 std::vector<MeshWheel> meshwheels;
1421 std::vector<MeshWheel2> meshwheels2;
1422 std::vector<Minimass> minimass;
1423 std::vector<Node> nodes; /* Nodes and Nodes2 are unified in this parser */
1424 std::vector<Particle> particles;
1425 std::vector<Pistonprop> pistonprops;
1426 std::vector<Prop> props;
1427 std::vector<RailGroup> railgroups;
1428 std::vector<Ropable> ropables;
1429 std::vector<Rope> ropes;
1430 std::vector<Rotator> rotators;
1431 std::vector<Rotator2> rotators2;
1432 std::vector<Screwprop> screwprops;
1433 std::vector<Script> scripts;
1434 std::vector<Shock> shocks;
1435 std::vector<Shock2> shocks2;
1436 std::vector<Shock3> shocks3;
1437 std::vector<CollisionRange> set_collision_range;
1438 std::vector<SkeletonSettings> set_skeleton_settings;
1439 std::vector<SlideNode> slidenodes;
1440 std::vector<SoundSource> soundsources;
1441 std::vector<SoundSource2> soundsources2;
1442 std::vector<SpeedLimiter> speedlimiter;
1443 std::vector<Ogre::String> submesh_groundmodel;
1444 std::vector<Submesh> submeshes;
1445 std::vector<Tie> ties;
1446 std::vector<TorqueCurve> torquecurve;
1447 std::vector<TractionControl> tractioncontrol;
1448 std::vector<TransferCase> transfercase;
1449 std::vector<Trigger> triggers;
1450 std::vector<Turbojet> turbojets;
1451 std::vector<Turboprop2> turboprops2;
1452 std::vector<VideoCamera> videocameras;
1453 std::vector<WheelDetacher> wheeldetachers;
1454 std::vector<Wheel> wheels;
1455 std::vector<Wheel2> wheels2;
1456 std::vector<Wing> wings;
1457
1458 // Metadata
1463 std::vector<DocComment> _comments;
1464 };
1465
1466 Document();
1467
1477 Ogre::String name;
1478
1479 // File hash
1480 std::string hash;
1481
1482 // Vehicle modules (caled 'sections' in truckfile doc)
1483 std::shared_ptr<Module> root_module;
1484 std::map< Ogre::String, std::shared_ptr<Module> > user_modules;
1485
1486};
1487
1488} // namespace RigDef
Central state/object manager and communications hub.
Bit operations.
#define BITMASK(OFFSET)
Definition BitFlags.h:10
uint64_t BitMask64_t
Definition BitFlags.h:8
#define BITMASK64(OFFSET)
Definition BitFlags.h:11
uint32_t BitMask_t
Definition BitFlags.h:7
Legacy parser resolved references on-the-fly and the condition to check named nodes was "are there an...
Definition RigDef_Node.h:78
static const float BEAM_SKELETON_DIAMETER
static const float BEAM_PLASTIC_COEF_DEFAULT
static const float DEFAULT_MINIMASS
minimum node mass in Kg
const char * ROOT_MODULE_NAME
@ c_COMMAND_STYLE
trigger is set with commandstyle boundaries instead of shocksytle
@ s_CMD_NUM_SWITCH
switch that exchanges cmdshort/cmdshort for all triggers with the same commandnumbers,...
@ t_CONTINUOUS
this trigger sends values between 0 and 1
@ A_INV_TRIGGER_BLOCKER
Blocker that enable/disable other triggers, reversed activation method (inverted Blocker style,...
@ B_TRIGGER_BLOCKER
Blocker that enable/disable other triggers.
@ E_ENGINE_TRIGGER
this trigger is used to control an engine
@ x_START_DISABLED
this trigger is disabled on startup, default is enabled
@ b_KEY_BLOCKER
Set the CommandKeys that are set in a commandkeyblocker or trigger to blocked on startup,...
ManagedMaterialType
Definition RigDef_File.h:79
DifferentialType
Definition RigDef_File.h:98
WingControlSurface
std::vector< DifferentialType > DifferentialTypeVec
@ l_SKIP_LOADED
Only apply minimum mass to nodes without "L" option.
@ s_SOFT_BUMP_BOUNDS
soft bump boundaries, use when shocks reach limiters too often and "jumprebound" (default is hard bum...
@ M_ABSOLUTE_METRIC
Absolute metric values for shortbound/longbound, settings apply without regarding to the original len...
@ i_INVISIBLE_INPUT_NORMAL
For backwards compatibility; combines flags 'j' and 'n'.
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
VideoCamRole
@ VCAM_ROLE_INVALID
int CommandkeyID_t
Index into Actor::ar_commandkeys (BEWARE: indexed 1-MAX_COMMANDKEYS, 0 is invalid value,...
static CameraMode_t CAMERA_MODE_ALWAYS_VISIBLE
ExtCameraMode
static const CommandkeyID_t COMMANDKEYID_INVALID
WheelPropulsion
WheelBraking
@ NONE
= no footbrake, no handbrake, no direction control – wheel is unbraked
static const BitMask_t OPTION_THROTTLE
unsigned int engine_idx
static const BitMask_t OPTION_RPM
static const BitMask_t OPTION_TORQUE
static const BitMask_t OPTION_PITCH
static const BitMask_t OPTION_STATUS
Node::Ref aditional_node
Node::Ref y_axis_node
Node::Ref reference_node
float max_inclination_angle
Node::Ref x_axis_node
Ogre::Vector3 offset
static const BitMask_t SOURCE_AERO_PITCH
static const BitMask_t SOURCE_AERO_STATUS
static const BitMask_t SOURCE_AERO_RPM
static const BitMask_t SOURCE_AERO_TORQUE
static const BitMask_t SOURCE_AERO_THROTTLE
static const BitMask_t SOURCE_GEAR_FORWARD
static const BitMask64_t SOURCE_GEAR_REVERSE
static const BitMask64_t SOURCE_TURBO
static const BitMask64_t SOURCE_SEQUENTIAL_SHIFT
static const BitMask64_t SOURCE_AIR_RUDDER
static const BitMask_t MODE_ROTATION_X
static const BitMask64_t SOURCE_ALTIMETER_1K
static const BitMask64_t SOURCE_AUTOSHIFTERLIN
static const BitMask_t MODE_OFFSET_Y
static const BitMask64_t SOURCE_SHIFT_LEFT_RIGHT
static const BitMask_t MODE_NO_FLIP
static const BitMask64_t SOURCE_FLAP
static const BitMask64_t SOURCE_SPEEDO
static const BitMask64_t SOURCE_DIFFLOCK
static const BitMask64_t SOURCE_ALTIMETER_10K
static const BitMask64_t SOURCE_AIRSPEED
BitMask64_t source
static const BitMask_t MODE_AUTO_ANIMATE
static const BitMask64_t SOURCE_ROLL
static const BitMask64_t SOURCE_BOAT_THROTTLE
static const BitMask64_t SOURCE_CLUTCH
static const BitMask_t MODE_OFFSET_Z
static const BitMask64_t SOURCE_PITCH
static const BitMask64_t SOURCE_TACHO
static const BitMask64_t SOURCE_AILERON
static const BitMask_t MODE_ROTATION_Y
static const BitMask64_t SOURCE_ELEVATOR
static const BitMask64_t SOURCE_PERMANENT
void AddMotorSource(BitMask_t source, unsigned int motor)
Ogre::String dash_link_name
static const BitMask_t MODE_EVENT_LOCK
Ogre::String event_name
static const BitMask64_t SOURCE_STEERING_WHEEL
static const BitMask64_t SOURCE_PARKING
static const BitMask64_t SOURCE_SHIFT_BACK_FORTH
static const BitMask64_t SOURCE_ACCEL
static const BitMask64_t SOURCE_IGNITION
static const BitMask64_t SOURCE_AIR_BRAKE
static const BitMask64_t SOURCE_GEAR_NEUTRAL
static const BitMask64_t SOURCE_ANGLE_OF_ATTACK
static const BitMask64_t SOURCE_VERTICAL_VELOCITY
static const BitMask_t MODE_OFFSET_X
static const BitMask_t MODE_BOUNCE
static const BitMask64_t SOURCE_SHIFTERLIN
static const BitMask64_t SOURCE_ALTIMETER_100K
static const BitMask64_t SOURCE_BOAT_RUDDER
std::list< MotorSource > motor_sources
static const BitMask64_t SOURCE_BRAKES
static const BitMask64_t SOURCE_TORQUE
static const BitMask_t MODE_ROTATION_Z
static const BitMask64_t SOURCE_DASHBOARD
static const BitMask64_t SOURCE_EVENT
static const BitMask64_t SOURCE_HEADING
static const BitMask64_t SOURCE_SIGNALSTALK
static const BitMask_t OPTION_ALTIMETER_100K
static const BitMask_t OPTION_ALTIMETER_1K
static const BitMask_t OPTION_SPEEDO
static const BitMask_t OPTION_ACCEL
static const BitMask_t OPTION_AIR_BRAKE
static const BitMask_t OPTION_ANGLE_OF_ATTACK
static const BitMask_t OPTION_BOAT_RUDDER
static const BitMask_t OPTION_ROLL
static const BitMask_t OPTION_SEQUENTIAL_SHIFT
static const BitMask_t OPTION_PARKING
static const BitMask_t OPTION_VISIBLE
static const BitMask_t OPTION_TURBO
static const BitMask_t OPTION_SHIFT_BACK_FORTH
static const BitMask_t OPTION_PITCH
AeroAnimator aero_animator
static const BitMask_t OPTION_AIRSPEED
std::shared_ptr< Inertia > inertia_defaults
static const BitMask_t OPTION_BOAT_THROTTLE
static const BitMask_t OPTION_SHORT_LIMIT
static const BitMask_t OPTION_ALTIMETER_10K
static const BitMask_t OPTION_VERTICAL_VELOCITY
static const BitMask_t OPTION_FLAP
std::shared_ptr< BeamDefaults > beam_defaults
static const BitMask_t OPTION_DIFFLOCK
static const BitMask_t OPTION_BRAKES
static const BitMask_t OPTION_TORQUE
static const BitMask_t OPTION_SHIFT_LEFT_RIGHT
static const BitMask_t OPTION_LONG_LIMIT
static const BitMask_t OPTION_INVISIBLE
static const BitMask_t OPTION_CLUTCH
Node::Ref nodes[2]
static const BitMask_t OPTION_GEAR_SELECT
static const BitMask_t OPTION_TACHO
std::string filename
Ogre::String name
unsigned int forum_account_id
bool _has_forum_account
Ogre::String type
Ogre::String email
DifferentialTypeVec options
Order matters!
Node::Ref wheels[2][2]
Ogre::String material_name
RoR::WheelSide side
Ogre::String mesh_name
RoR::WheelBraking braking
unsigned int num_rays
std::shared_ptr< BeamDefaults > beam_defaults
std::shared_ptr< NodeDefaults > node_defaults
Node::Ref rigidity_node
RoR::WheelPropulsion propulsion
Node::Ref nodes[2]
Node::Ref reference_arm_node
float GetScaledBreakingThreshold()
BeamDefaultsScale scale
float GetScaledDeformThreshold() const
bool _is_plastic_deform_coef_user_defined
Ogre::String beam_material_name
bool _is_user_defined
Informs whether these data were read from "set_beam_defaults" directive or filled in by the parser on...
bool _enable_advanced_deformation
Informs whether "enable_advanced_deformation" directive preceded these defaults.
static const BitMask_t OPTION_r_ROPE
BitMask_t options
bool _has_extension_break_limit
std::shared_ptr< BeamDefaults > defaults
float extension_break_limit
static const BitMask_t OPTION_i_INVISIBLE
Node::Ref nodes[2]
static const BitMask_t OPTION_s_SUPPORT
float default_braking_force
float parking_brake_force
static const BitMask_t OPTION_r_BUOYANT_ONLY_DRAG
static const BitMask_t OPTION_p_10xTOUGHER
static const BitMask_t OPTION_s_BUOYANT_NO_DRAG
static const BitMask_t OPTION_F_10xTOUGHER_BUOYANT
static const BitMask_t OPTION_b_BUOYANT
Node::Ref nodes[3]
static const BitMask_t OPTION_D_CONTACT_BUOYANT
static const BitMask_t OPTION_S_INVULNERABLE_BUOYANT
static const BitMask_t OPTION_c_CONTACT
BitMask_t options
static const BitMask_t OPTION_u_INVULNERABLE
Node::Ref left_node
Node::Ref center_node
Node::Ref back_node
std::vector< Node::Ref > nodes
int mode
0 and higher = cinecam index
Ogre::Vector3 position
std::shared_ptr< BeamDefaults > beam_defaults
Node::Ref nodes[8]
std::shared_ptr< NodeDefaults > node_defaults
std::vector< Node::Ref > nodes
Ogre::String description
std::shared_ptr< Inertia > inertia_defaults
Node::Ref nodes[2]
RoR::CommandkeyID_t extend_key
RoR::CommandkeyID_t contract_key
std::shared_ptr< BeamDefaults > beam_defaults
bool option_o_1press_center
float min_mass_Kg
minimum node mass in Kg
std::string skin_name
< Represents a comment (line starting with ';' or '//') that can be anywhere in the file.
int commented_datapos
Position in the data vector for the given keyword.
std::string comment_text
May contain multiple lines separated by ' ' - MUST contain leading ';' or '//' at each line!
RigDef::Keyword commented_keyword
std::vector< Node::Ref > fixes
std::vector< Wheel2 > wheels2
std::vector< Exhaust > exhausts
std::vector< Ropable > ropables
std::vector< Prop > props
std::vector< CollisionBox > collisionboxes
std::vector< InterAxle > interaxles
std::vector< Rotator2 > rotators2
std::vector< SoundSource2 > soundsources2
std::vector< Rotator > rotators
std::vector< Script > scripts
RoR::CacheEntryPtr origin_addonpart
Addon parts are spawned as fake Modules, resources must be loaded from this group.
std::vector< SkeletonSettings > set_skeleton_settings
std::vector< Ogre::String > submesh_groundmodel
std::vector< Wing > wings
std::vector< CustomDashboardInput > customdashboardinputs
std::vector< GuiSettings > guisettings
std::vector< AntiLockBrakes > antilockbrakes
std::vector< DocComment > _comments
std::vector< Ogre::String > description
std::vector< MeshWheel2 > meshwheels2
std::vector< Turbojet > turbojets
std::vector< Particle > particles
std::vector< VideoCamera > videocameras
std::vector< CollisionRange > set_collision_range
std::vector< Minimass > minimass
std::vector< Shock > shocks
std::vector< WheelDetacher > wheeldetachers
std::vector< CruiseControl > cruisecontrol
std::vector< DefaultSkin > default_skin
std::vector< Shock2 > shocks2
std::vector< Tie > ties
std::vector< Hook > hooks
std::vector< Pistonprop > pistonprops
std::vector< TractionControl > tractioncontrol
std::vector< Engturbo > engturbo
std::vector< Author > author
std::vector< MeshWheel > meshwheels
std::vector< Animator > animators
std::vector< SoundSource > soundsources
std::vector< Cinecam > cinecam
std::vector< ManagedMaterial > managedmaterials
std::vector< SpeedLimiter > speedlimiter
std::vector< Submesh > submeshes
std::vector< FlexBodyWheel > flexbodywheels
std::vector< Assetpack > assetpacks
std::vector< FlaregroupNoImport > flaregroups_no_import
std::vector< TransferCase > transfercase
std::vector< Flexbody > flexbodies
std::vector< Globals > globals
std::vector< Lockgroup > lockgroups
std::vector< Node > nodes
std::vector< Rope > ropes
std::vector< Node::Ref > contacters
std::vector< Wheel > wheels
std::vector< Engoption > engoption
std::vector< Command2 > commands2
std::vector< TorqueCurve > torquecurve
std::vector< Trigger > triggers
std::vector< MaterialFlareBinding > materialflarebindings
std::vector< ExtCamera > extcamera
std::vector< Turboprop2 > turboprops2
std::vector< RailGroup > railgroups
std::vector< Fileinfo > fileinfo
std::vector< Engine > engine
std::vector< Axle > axles
std::vector< Shock3 > shocks3
std::vector< Hydro > hydros
std::vector< Screwprop > screwprops
std::vector< SlideNode > slidenodes
std::vector< CameraRail > camerarail
std::vector< Beam > beams
std::vector< Brakes > brakes
std::vector< Camera > cameras
std::vector< Fusedrag > fusedrag
std::vector< Help > help
std::vector< Flare3 > flares3
std::vector< Flare2 > flares2
std::vector< Airbrake > airbrakes
std::vector< Guid > guid
std::vector< FileFormatVersion > fileformatversion
bool lockgroup_default_nolock
std::shared_ptr< Module > root_module
Required to exist. shared_ptr is used for unified handling with other modules.
Ogre::String name
std::map< Ogre::String, std::shared_ptr< Module > > user_modules
bool slide_nodes_connect_instantly
bool enable_advanced_deformation
std::string hash
std::vector< float > gear_ratios
float global_gear_ratio
float neutral_gear_ratio
float reverse_gear_ratio
float shift_time
Seconds.
float post_shift_time
Seconds.
float clutch_time
Seconds.
Node::Ref direction_node
Node::Ref reference_node
Ogre::String particle_name
RoR::ExtCameraMode mode
Ogre::String unique_id
std::shared_ptr< Inertia > inertia_defaults
RoR::FlareType type
Ogre::String material_name
Node::Ref node_axis_x
Node::Ref reference_node
Ogre::Vector3 offset
int control_number
Only 'u' type flares.
std::string dashboard_link
Only 'd' type flares.
Node::Ref node_axis_y
int control_number
Only 'u' type flares.
Ogre::String tyre_mesh_name
RoR::WheelSide side
Ogre::String rim_mesh_name
std::vector< Node::Range > node_list_to_import
CameraSettings camera_settings
Ogre::String mesh_name
Node::Ref y_axis_node
Ogre::Vector3 rotation
std::list< Animation > animations
Ogre::Vector3 offset
Node::Ref reference_node
Node::Ref x_axis_node
std::vector< Node::Ref > node_list
std::vector< Forvert > forvert
Manually specified (vert => node) bindings for flexbody deformation (overrides 'forset').
Node::Ref node_ref
Node::Ref node_y
Node::Ref node_x
Node::Ref rear_node
Ogre::String airfoil_name
Node::Ref front_node
Ogre::String material_name
std::string guid
std::string material
Node::Ref node
float option_max_force
bool flag_no_disable
bool flag_self_lock
float option_timer
float option_speed_coef
bool flag_auto_lock
float option_hook_range
float option_min_range_meters
static const BitMask_t OPTION_e_INPUT_ELEVATOR
std::shared_ptr< Inertia > inertia_defaults
float lenghtening_factor
static const BitMask_t OPTION_s_DISABLE_ON_HIGH_SPEED
BitMask_t options
static const BitMask_t OPTION_h_INPUT_InvELEVATOR_RUDDER
static const BitMask_t OPTION_g_INPUT_ELEVATOR_RUDDER
static const BitMask_t OPTION_y_INPUT_InvAILERON_RUDDER
Node::Ref nodes[2]
static const BitMask_t OPTION_j_INVISIBLE
static const BitMask_t OPTION_v_INPUT_InvAILERON_ELEVATOR
static const BitMask_t OPTION_a_INPUT_AILERON
static const BitMask_t OPTION_r_INPUT_RUDDER
static const BitMask_t OPTION_n_INPUT_NORMAL
static const BitMask_t OPTION_u_INPUT_AILERON_ELEVATOR
Inertia inertia
static const BitMask_t OPTION_x_INPUT_AILERON_RUDDER
std::shared_ptr< BeamDefaults > beam_defaults
Ogre::String start_function
float start_delay_factor
float stop_delay_factor
Ogre::String stop_function
DifferentialTypeVec options
Order matters!
static const int LOCKGROUP_NOLOCK
std::vector< Node::Ref > nodes
static const int LOCKGROUP_DEFAULT
static const char * TypeToStr(ManagedMaterialType type)
ManagedMaterialType type
ManagedMaterialsOptions options
Ogre::String specular_map
Ogre::String damaged_diffuse_map
float global_min_mass_Kg
minimum node mass in Kg - only effective where DefaultMinimass was not set.
MinimassOption option
unsigned int options
Bit flags.
Node::Ref emitter_node
Node::Ref reference_node
Ogre::String particle_system_name
Node::Ref reference_node
Ogre::String airfoil
Node::Ref couple_node
Node::Ref blade_tip_nodes[4]
Ogre::ColourValue color
Node::Ref reference_node
Node::Ref x_axis_node
DashboardSpecial special_prop_dashboard
CameraSettings camera_settings
Ogre::Vector3 offset
Ogre::String mesh_name
BeaconSpecial special_prop_beacon
Node::Ref y_axis_node
SpecialProp special
std::list< Animation > animations
Ogre::Vector3 rotation
std::vector< Node::Range > node_list
std::shared_ptr< BeamDefaults > beam_defaults
Node::Ref end_node
Node::Ref root_node
Ogre::String description
std::shared_ptr< Inertia > inertia_defaults
unsigned int spin_left_key
Node::Ref base_plate_nodes[4]
Node::Ref axis_nodes[2]
Node::Ref rotating_plate_nodes[4]
unsigned int spin_right_key
std::string filename
BitMask_t options
Node::Ref nodes[2]
static const BitMask_t OPTION_i_INVISIBLE
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
float progress_factor_damp_out
Progression factor dampout, 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spring...
float damp_out
damping value applied when shock extending
float progress_factor_damp_in
Progression factor for dampin. 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spr...
std::shared_ptr< BeamDefaults > beam_defaults
static const BitMask_t OPTION_m_METRIC
float spring_in
Spring value applied when the shock is compressing.
static const BitMask_t OPTION_s_SOFT_BUMP_BOUNDS
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
float progress_factor_spring_out
Progression factor springout, 0 = disabled, 1...x as multipliers, example:maximum springrate == sprin...
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
float spring_out
spring value applied when shock extending
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
float damp_in
Damping value applied when the shock is compressing.
float progress_factor_spring_in
Progression factor for springin. A value of 0 disables this option. 1...x as multipliers,...
float damp_in_slow
Damping value applied when shock is commpressing slower than split in velocity.
float spring_in
Spring value applied when the shock is compressing.
float spring_out
Spring value applied when shock extending.
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
float damp_in
Damping value applied when the shock is compressing.
float split_vel_in
Split velocity in (m/s) - threshold for slow / fast damping during compression.
BitMask_t options
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
Node::Ref nodes[2]
static const BitMask_t OPTION_i_INVISIBLE
static const BitMask_t OPTION_m_METRIC
std::shared_ptr< BeamDefaults > beam_defaults
float damp_out
Damping value applied when shock extending.
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
float damp_out_slow
Damping value applied when shock is commpressing slower than split out velocity.
float damp_out_fast
Damping value applied when shock is commpressing faster than split out velocity.
float damp_in_fast
Damping value applied when shock is commpressing faster than split in velocity.
float split_vel_out
Split velocity in (m/s) - threshold for slow / fast damping during extension.
static const BitMask_t OPTION_L_ACTIVE_LEFT
std::shared_ptr< BeamDefaults > beam_defaults
float damping
The 'resistance to motion' of the shock. The best value is given by this equation: 2 * sqrt(suspended...
float spring_rate
The 'stiffness' of the shock. The higher the value, the less the shock will move for a given bump.
static const BitMask_t OPTION_m_METRIC
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
Node::Ref nodes[2]
float short_bound
Maximum contraction. The shortest length the shock can be, as a proportion of its original length....
float long_bound
Maximum extension. The longest length a shock can be, as a proportion of its original length....
static const BitMask_t OPTION_i_INVISIBLE
static const BitMask_t OPTION_R_ACTIVE_RIGHT
BitMask_t options
static const BitMask_t CONSTRAINT_ATTACH_ALL
static const BitMask_t CONSTRAINT_ATTACH_NONE
static const BitMask_t CONSTRAINT_ATTACH_FOREIGN
static const BitMask_t CONSTRAINT_ATTACH_SELF
BitMask_t constraint_flags
std::vector< Node::Range > rail_node_ranges
static const int MODE_EXTERIOR
static const int MODE_ALWAYS
int mode
A special constant or cinecam index.
Ogre::String sound_script_name
std::vector< Cab > cab_triangles
std::vector< Texcoord > texcoords
Node::Ref root_node
float auto_shorten_rate
static const BitMask_t OPTION_i_INVISIBLE
static const BitMask_t OPTION_s_DISABLE_SELF_LOCK
std::shared_ptr< BeamDefaults > beam_defaults
BitMask_t options
float max_reach_length
std::vector< Sample > samples
Ogre::String predefined_func_name
std::vector< float > gear_ratios
static const BitMask_t OPTION_B_TRIGGER_BLOCKER
static const BitMask_t OPTION_s_CMD_NUM_SWITCH
static const BitMask_t OPTION_h_UNLOCKS_HOOK_GROUP
static const BitMask_t OPTION_i_INVISIBLE
static const BitMask_t OPTION_t_CONTINUOUS
static const BitMask_t OPTION_E_ENGINE_TRIGGER
static const BitMask_t OPTION_c_COMMAND_STYLE
static const BitMask_t OPTION_b_KEY_BLOCKER
float contraction_trigger_limit
static const BitMask_t OPTION_x_START_DISABLED
std::shared_ptr< BeamDefaults > beam_defaults
BitMask_t options
float expansion_trigger_limit
Node::Ref nodes[2]
static const BitMask_t OPTION_H_LOCKS_HOOK_GROUP
static const BitMask_t OPTION_A_INV_TRIGGER_BLOCKER
int shortbound_trigger_action
Node::Ref front_node
Node::Ref back_node
Node::Ref side_node
Node::Ref blade_tip_nodes[4]
Node::Ref reference_node
Ogre::String airfoil
RoR::VideoCamRole camera_role
Ogre::String material_name
unsigned int texture_width
Ogre::String camera_name
Node::Ref alt_orientation_node
Node::Ref alt_reference_node
unsigned int texture_height
Ogre::Vector3 rotation
Ogre::Vector3 offset
Ogre::String face_material_name
Ogre::String band_material_name
Ogre::String band_material_name
Ogre::String face_material_name
float tex_coords[8]
float min_deflection
float efficacy_coef
WingControlSurface control_surface
Ogre::String airfoil
float max_deflection
Node::Ref nodes[8]