RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RigDef_Serializer.cpp
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 
25 
26 #include "RigDef_Serializer.h"
27 
28 #include "Actor.h"
29 #include "GUIManager.h"
30 #include "RigDef_File.h"
31 
32 #include <fstream>
33 #include <OgreStringConverter.h>
34 #include <iomanip>
35 #include <unordered_map>
36 
37 using namespace RoR;
38 using namespace RigDef;
39 using namespace std;
40 
41 Serializer::Serializer(RigDef::DocumentPtr def_file):
42  m_rig_def(def_file),
43  m_node_id_width(5),
44  m_inertia_function_width(10),
45  m_bool_width(5), // strlen("false") == 5
46  m_command_key_width(2),
47  m_float_width(10)
48 {}
49 
51 {
52  // Write banner
53  m_stream
54  << "; ---------------------------------------------------------------------------- ;" << endl
55  << "; Project: Rigs of Rods (http://www.rigsofrods.org) ;" << endl
56  << "; File format: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck ;" << endl
57  << "; ---------------------------------------------------------------------------- ;" << endl
58  << endl;
59 
60  // Write name
61  m_stream << m_rig_def->name << endl << endl;
62 
63  // Select source
64  Document::Module* source_module = m_rig_def->root_module.get();
65 
66  // Write individual elements
67 
68  // About
69  ProcessDescription(source_module);
70  ProcessAuthors(source_module);
71  ProcessFileinfo(source_module);
72  ProcessGuid(source_module);
73  WriteFlags();
74 
75  // Modules (aka 'sectionconfig')
76  this->SerializeModule(m_rig_def->root_module);
77  for (auto module_itor: m_rig_def->user_modules)
78  {
79  this->SerializeModule(module_itor.second);
80  }
81 
82  // Finalize
83  m_stream << "end" << endl;
84 }
85 
86 void Serializer::SerializeModule(std::shared_ptr<RigDef::Document::Module> m)
87 {
88  RigDef::Document::Module* source_module = m.get();
89 
90  if (m->name != RigDef::ROOT_MODULE_NAME)
91  {
92  m_stream << "section -1 " << m->name << endl;
93  }
94 
95  ProcessManagedMaterialsAndOptions(source_module);
96  ProcessGlobals(source_module);
97 
98  // Structure
99  ProcessNodes(source_module);
100  ProcessBeams(source_module);
101  ProcessCameras(source_module);
102  ProcessShocks(source_module);
103  ProcessShocks2(source_module);
104  ProcessHydros(source_module);
105  ProcessCommands2(source_module);
106  ProcessSlideNodes(source_module);
107  ProcessTies(source_module);
108  ProcessRopes(source_module);
109  ProcessFixes(source_module);
110 
111  // Wheels
112  ProcessMeshWheels(source_module);
113  ProcessMeshWheels2(source_module);
114  ProcessWheels(source_module);
115  ProcessWheels2(source_module);
116  ProcessFlexBodyWheels(source_module);
117 
118  // Driving
119  ProcessEngine(source_module);
120  ProcessEngoption(source_module);
121  ProcessBrakes(source_module);
122  ProcessAntiLockBrakes(source_module);
123  ProcessTractionControl(source_module);
124  ProcessTorqueCurve(source_module);
125  ProcessCruiseControl(source_module);
126  ProcessSpeedLimiter(source_module);
127  ProcessAxles(source_module);
128  ProcessTransferCase(source_module);
129  ProcessInterAxles(source_module);
130 
131  // Features
132  ProcessCinecam(source_module);
133  ProcessAnimators(source_module);
134  ProcessContacters(source_module);
135  ProcessTriggers(source_module);
136  ProcessLockgroups(source_module);
137  ProcessHooks(source_module);
138  ProcessRailGroups(source_module);
139  ProcessRopables(source_module);
140  ProcessParticles(source_module);
141  ProcessCollisionBoxes(source_module);
142  // TODO: detacher_group
143  ProcessFlares2(source_module);
144  ProcessMaterialFlareBindings(source_module);
145  ProcessPropsAndAnimations(source_module);
146  ProcessSubmesh(source_module);
147  ProcessSubmeshGroundmodel(source_module);
148  ProcessExhausts(source_module);
149  ProcessGuiSettings(source_module);
150  ProcessSetSkeletonSettings(source_module);
151  ProcessVideocamera(source_module);
152  ProcessExtCamera(source_module);
153  ProcessSoundsources(source_module);
154  ProcessSoundsources2(source_module);
155 
156  // Aerial
157  ProcessWings(source_module);
158  ProcessAirbrakes(source_module);
159  ProcessTurboprops(source_module);
160  ProcessFusedrag(source_module);
161  ProcessPistonprops(source_module);
162  ProcessTurbojets(source_module);
163 
164  // Marine
165  ProcessScrewprops(source_module);
166 
167  if (m->name != RigDef::ROOT_MODULE_NAME)
168  {
169  m_stream << "endsection" << endl;
170  }
171 }
172 
174 {
175  if (module->pistonprops.empty())
176  {
177  return;
178  }
179  m_stream << "pistonprops" << endl;
180  auto end_itor = module->pistonprops.end();
181  for (auto itor = module->pistonprops.begin(); itor != end_itor; ++itor)
182  {
183  this->ExportDocComment(module, Keyword::PISTONPROPS, std::distance(module->pistonprops.begin(), itor));
184 
185  auto & def = *itor;
186 
187  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.reference_node.Str()
188  << ", " << setw(m_node_id_width) << def.axis_node.Str()
189  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[0].Str()
190  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[1].Str()
191  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[2].Str()
192  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[3].Str()
193  << ", " << setw(m_node_id_width) << (def.couple_node.IsValidAnyState() ? def.couple_node.Str() : "-1")
194  << ", " << setw(m_float_width) << def.turbine_power_kW
195  << ", " << setw(m_float_width) << def.pitch
196  << ", " << def.airfoil
197  << endl;
198  }
199  m_stream << endl; // Empty line
200 }
201 
203 {
204  if (module->turbojets.empty())
205  {
206  return;
207  }
208  m_stream << "turbojets" << endl;
209  auto end_itor = module->turbojets.end();
210  for (auto itor = module->turbojets.begin(); itor != end_itor; ++itor)
211  {
212  this->ExportDocComment(module, Keyword::TURBOJETS, std::distance(module->turbojets.begin(), itor));
213 
214  auto & def = *itor;
215 
216  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.front_node.Str()
217  << ", " << setw(m_node_id_width) << def.back_node.Str()
218  << ", " << setw(m_node_id_width) << def.side_node.Str()
219  << ", " << setw(2) << def.is_reversable
220  << ", " << setw(m_float_width) << def.dry_thrust
221  << ", " << setw(m_float_width) << def.wet_thrust
222  << ", " << setw(m_float_width) << def.front_diameter
223  << ", " << setw(m_float_width) << def.back_diameter
224  << ", " << setw(m_float_width) << def.nozzle_length
225  << endl;
226  }
227  m_stream << endl; // Empty line
228 }
229 
231 {
232  if (module->screwprops.empty())
233  {
234  return;
235  }
236  m_stream << "screwprops" << endl;
237  auto end_itor = module->screwprops.end();
238  for (auto itor = module->screwprops.begin(); itor != end_itor; ++itor)
239  {
240  this->ExportDocComment(module, Keyword::SCREWPROPS, std::distance(module->screwprops.begin(), itor));
241 
242  auto & def = *itor;
243 
244  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.prop_node.Str()
245  << ", " << setw(m_node_id_width) << def.back_node.Str()
246  << ", " << setw(m_node_id_width) << def.top_node.Str()
247  << ", " << setw(m_float_width) << def.power
248  << endl;
249  }
250  m_stream << endl; // Empty line
251 }
252 
254 {
255  m_stream << "fusedrag" << endl;
256  for (RigDef::Fusedrag& def: module->fusedrag)
257  {
259  << setw(m_node_id_width) << def.front_node.Str() << ", "
260  << setw(m_node_id_width) << def.rear_node.Str() << ", ";
261  if (def.autocalc)
262  {
263  m_stream << "autocalc, " << setw(m_float_width) << def.area_coefficient;
264  }
265  else
266  {
267  m_stream << setw(m_float_width) << def.approximate_width;
268  }
269  m_stream << ", " << def.airfoil_name
270  << endl;
271  }
272 
273  m_stream << endl; // Empty line
274 }
275 
277 {
278  if (module->turboprops2.empty())
279  {
280  return;
281  }
282  m_stream << "turboprops" << endl;
283  auto end_itor = module->turboprops2.end();
284  for (auto itor = module->turboprops2.begin(); itor != end_itor; ++itor)
285  {
286  this->ExportDocComment(module, Keyword::TURBOPROPS, std::distance(module->turboprops2.begin(), itor));
287 
288  RigDef::Turboprop2 & def = *itor;
289 
291  << ", " << setw(m_node_id_width) << def.axis_node.Str()
292  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[0].Str()
293  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[1].Str()
294  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[2].Str()
295  << ", " << setw(m_node_id_width) << def.blade_tip_nodes[3].Str()
296  << ", " << setw(m_float_width) << def.turbine_power_kW
297  << ", " << def.airfoil
298  << endl;
299  }
300  m_stream << endl; // Empty line
301 }
302 
304 {
305  if (module->airbrakes.empty())
306  {
307  return;
308  }
309  m_stream << "airbrakes" << endl;
310  auto end_itor = module->airbrakes.end();
311  for (auto itor = module->airbrakes.begin(); itor != end_itor; ++itor)
312  {
313  this->ExportDocComment(module, Keyword::AIRBRAKES, std::distance(module->airbrakes.begin(), itor));
314 
315  RigDef::Airbrake & def = *itor;
316 
318  << ", " << setw(m_node_id_width) << def.x_axis_node.Str()
319  << ", " << setw(m_node_id_width) << def.y_axis_node.Str()
320  << ", " << setw(m_node_id_width) << (def.aditional_node.IsValidAnyState() ? def.aditional_node.Str() : "-1")
321  << ", " << setw(m_float_width) << def.offset.x
322  << ", " << setw(m_float_width) << def.offset.y
323  << ", " << setw(m_float_width) << def.offset.z
324  << ", " << setw(m_float_width) << def.width
325  << ", " << setw(m_float_width) << def.height
326  << ", " << setw(m_float_width) << def.max_inclination_angle
327  << ", " << setw(m_float_width) << def.texcoord_x1
328  << ", " << setw(m_float_width) << def.texcoord_y1
329  << ", " << setw(m_float_width) << def.texcoord_x2
330  << ", " << setw(m_float_width) << def.texcoord_y2
331  << ", " << setw(m_float_width) << def.lift_coefficient
332  << endl;
333  }
334  m_stream << endl; // Empty line
335 }
336 
338 {
339  if (module->wings.empty())
340  {
341  return;
342  }
343  m_stream << "wings" << endl;
344  auto end_itor = module->wings.end();
345  for (auto itor = module->wings.begin(); itor != end_itor; ++itor)
346  {
347  this->ExportDocComment(module, Keyword::WINGS, std::distance(module->wings.begin(), itor));
348 
349  RigDef::Wing & def = *itor;
350 
351  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.nodes[0].Str()
352  << ", " << setw(m_node_id_width) << def.nodes[1].Str()
353  << ", " << setw(m_node_id_width) << def.nodes[2].Str()
354  << ", " << setw(m_node_id_width) << def.nodes[3].Str()
355  << ", " << setw(m_node_id_width) << def.nodes[4].Str()
356  << ", " << setw(m_node_id_width) << def.nodes[5].Str()
357  << ", " << setw(m_node_id_width) << def.nodes[6].Str()
358  << ", " << setw(m_node_id_width) << def.nodes[7].Str()
359  << ", " << setw(m_float_width) << def.tex_coords[0]
360  << ", " << setw(m_float_width) << def.tex_coords[1]
361  << ", " << setw(m_float_width) << def.tex_coords[2]
362  << ", " << setw(m_float_width) << def.tex_coords[3]
363  << ", " << setw(m_float_width) << def.tex_coords[4]
364  << ", " << setw(m_float_width) << def.tex_coords[5]
365  << ", " << setw(m_float_width) << def.tex_coords[6]
366  << ", " << setw(m_float_width) << def.tex_coords[7]
367  << ", " << (char)def.control_surface
368  << ", " << setw(m_float_width) << def.chord_point
369  << ", " << setw(m_float_width) << def.min_deflection
370  << ", " << setw(m_float_width) << def.max_deflection
371  << ", " << def.airfoil
372  << ", " << def.efficacy_coef
373  << endl;
374  }
375  m_stream << endl; // Empty line
376 }
377 
379 {
380  if (module->soundsources.empty())
381  {
382  return;
383  }
384  m_stream << "soundsources" << endl;
385  auto end_itor = module->soundsources.end();
386  for (auto itor = module->soundsources.begin(); itor != end_itor; ++itor)
387  {
388  this->ExportDocComment(module, Keyword::SOUNDSOURCES, std::distance(module->soundsources.begin(), itor));
389 
390  RigDef::SoundSource & def = *itor;
391 
392  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.node.Str() << ", " << def.sound_script_name
393  << endl;
394  }
395  m_stream << endl; // Empty line
396 }
397 
399 {
400  if (module->soundsources2.empty())
401  {
402  return;
403  }
404  m_stream << "soundsources2" << endl;
405  auto end_itor = module->soundsources2.end();
406  for (auto itor = module->soundsources2.begin(); itor != end_itor; ++itor)
407  {
408  this->ExportDocComment(module, Keyword::SOUNDSOURCES2, std::distance(module->soundsources2.begin(), itor));
409 
410  RigDef::SoundSource2 & def = *itor;
411 
413  << ", " << setw(2) << def.mode
414  << ", " << def.sound_script_name
415  << endl;
416  }
417  m_stream << endl; // Empty line
418 }
419 
421 {
422  if (module->extcamera.size() == 0)
423  {
424  return;
425  }
426  RigDef::ExtCamera* def = &module->extcamera[0];
427  m_stream << "extcamera ";
428 
429  switch (def->mode)
430  {
431  case ExtCameraMode::NODE:
432  m_stream << "node " << def->node.Str();
433  break;
434  case ExtCameraMode::CINECAM:
435  m_stream << "cinecam";
436  break;
437  case ExtCameraMode::CLASSIC:
438  default:
439  m_stream << "classic";
440  break;
441  }
442  m_stream << "\n\n";
443 }
444 
446 {
447  if (module->videocameras.empty())
448  {
449  return;
450  }
451  m_stream << "videocamera" << endl;
452  auto end_itor = module->videocameras.end();
453  for (auto itor = module->videocameras.begin(); itor != end_itor; ++itor)
454  {
455  this->ExportDocComment(module, Keyword::VIDEOCAMERA, std::distance(module->videocameras.begin(), itor));
456 
457  RigDef::VideoCamera & def = *itor;
458 
460  << ", " << setw(m_node_id_width) << def.left_node.Str()
461  << ", " << setw(m_node_id_width) << def.bottom_node.Str()
462  << ", " << setw(m_node_id_width) << (def.alt_reference_node.IsValidAnyState() ? def.alt_reference_node.Str() : "-1")
463  << ", " << setw(m_node_id_width) << (def.alt_orientation_node.IsValidAnyState() ? def.alt_orientation_node.Str() : "-1")
464  << ", " << setw(m_float_width) << def.offset.x
465  << ", " << setw(m_float_width) << def.offset.y
466  << ", " << setw(m_float_width) << def.offset.z
467  << ", " << setw(m_float_width) << def.rotation.x
468  << ", " << setw(m_float_width) << def.rotation.y
469  << ", " << setw(m_float_width) << def.rotation.z
470  << ", " << setw(m_float_width) << def.field_of_view
471  << ", " << setw(4) << def.texture_width
472  << ", " << setw(4) << def.texture_height
473  << ", " << setw(m_float_width) << def.min_clip_distance
474  << ", " << setw(m_float_width) << def.max_clip_distance
475  << ", " << setw(3) << def.camera_role
476  << ", " << setw(3) << def.camera_mode
477  << ", " << def.material_name;
478  if (!def.camera_name.empty())
479  {
480  m_stream << ", " << def.camera_name;
481  }
482 
483  m_stream << endl;
484  }
485  m_stream << endl; // Empty line
486 }
487 
489 {
490  if (module->set_skeleton_settings.empty())
491  {
492  return;
493  }
494 
495  RigDef::SkeletonSettings& def = module->set_skeleton_settings[module->set_skeleton_settings.size() - 1];
496  m_stream << "set_skeleton_settings " << def.visibility_range_meters << ", " << def.beam_thickness_meters << "\n\n";
497 }
498 
500 {
501  if (module->guisettings.empty())
502  {
503  return;
504  }
505  m_stream << "guisettings";
506  for (GuiSettings& gs: module->guisettings)
507  {
508  m_stream << m_dataline_indentstr << gs.key << "=" << gs.value
509  << endl;
510  }
511  m_stream << endl; // Empty line
512 }
513 
515 {
516  if (module->exhausts.empty())
517  {
518  return;
519  }
520  m_stream << "exhausts" << endl;
521  auto end_itor = module->exhausts.end();
522  for (auto itor = module->exhausts.begin(); itor != end_itor; ++itor)
523  {
524  this->ExportDocComment(module, Keyword::EXHAUSTS, std::distance(module->exhausts.begin(), itor));
525 
526  RigDef::Exhaust & def = *itor;
527 
529  << ", " << setw(m_node_id_width) << def.direction_node.Str()
530  << ", " << def.particle_name
531  << endl;
532  }
533  m_stream << endl; // Empty line
534 }
535 
537 {
538  if (module->submesh_groundmodel.empty())
539  {
540  return;
541  }
542 
543  m_stream << "submesh_groundmodel " << module->submesh_groundmodel.back() << endl << endl; // Empty line
544 }
545 
547 {
548  for (RigDef::Submesh & def: module->submeshes)
549  {
550  m_stream << "submesh" << endl;
551 
552  if (def.texcoords.size() > 0)
553  {
554  m_stream << "texcoords" << endl;
555  auto texcoord_end = def.texcoords.end();
556  for (auto texcoord_itor = def.texcoords.begin(); texcoord_itor != texcoord_end; ++texcoord_itor)
557  {
558  m_stream << m_dataline_indentstr << setw(m_node_id_width) << texcoord_itor->node.Str() << ", " << texcoord_itor->u << ", " << texcoord_itor->v << endl;
559  }
560  }
561  if (def.cab_triangles.size() > 0)
562  {
563  m_stream << "cab" << endl;
564  auto cab_end = def.cab_triangles.end();
565  for (auto cab_itor = def.cab_triangles.begin(); cab_itor != cab_end; ++cab_itor)
566  {
567  m_stream << m_dataline_indentstr << setw(m_node_id_width) << cab_itor->nodes[0].Str()
568  << ", " << setw(m_node_id_width) << cab_itor->nodes[1].Str()
569  << ", " << setw(m_node_id_width) << cab_itor->nodes[2].Str()
570  << ", n";
571 
572  // Options
573  if (BITMASK_IS_1(cab_itor->options, Cab::OPTION_c_CONTACT )) m_stream << (char)CabOption::c_CONTACT;
574  if (BITMASK_IS_1(cab_itor->options, Cab::OPTION_b_BUOYANT )) m_stream << (char)CabOption::b_BUOYANT;
575  if (BITMASK_IS_1(cab_itor->options, Cab::OPTION_p_10xTOUGHER )) m_stream << (char)CabOption::p_10xTOUGHER;
582  m_stream << endl;
583  }
584  }
585  if (def.backmesh)
586  {
587  m_stream << "backmesh" << endl;
588  }
589  m_stream << endl; // Empty line
590  }
591 }
592 
593 inline void PropAnimFlag(std::stringstream& out, int flags, bool& join, unsigned int mask, const char* name, char joiner = '|')
594 {
595  if (flags & mask)
596  {
597  if (join)
598  {
599  out << joiner;
600  }
601  out << name;
602  join = true;
603  }
604 }
605 
607 {
608  m_stream << "\tadd_animation "
609  << setw(m_float_width) << anim.ratio << ", "
610  << setw(m_float_width) << anim.lower_limit << ", "
611  << setw(m_float_width) << anim.upper_limit << ", "
612  << "source: ";
613 
614  // Source flags
615  bool join = false;
616  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_AIRSPEED , "airspeed");
618  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ALTIMETER_100K , "altimeter100k");
619  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ALTIMETER_10K , "altimeter10k");
620  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ALTIMETER_1K , "altimeter1k");
622  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_FLAP , "flap");
623  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_AIR_BRAKE , "airbrake");
624  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ROLL , "roll");
625  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_PITCH , "pitch");
626  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_BRAKES , "brakes");
627  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ACCEL , "accel");
628  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_CLUTCH , "clutch");
629  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_SPEEDO , "speedo");
630  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_TACHO , "tacho");
631  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_TURBO , "turbo");
632  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_PARKING , "parking");
633  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_SHIFT_LEFT_RIGHT , "shifterman1");
634  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_SHIFT_BACK_FORTH , "shifterman2");
635  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_SEQUENTIAL_SHIFT , "sequential");
636  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_SHIFTERLIN , "shifterlin");
637  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_TORQUE , "torque");
638  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_HEADING , "heading");
639  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_DIFFLOCK , "difflock");
640  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_BOAT_RUDDER , "rudderboat");
641  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_BOAT_THROTTLE , "throttleboat");
642  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_STEERING_WHEEL , "steeringwheel");
643  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_AILERON , "aileron");
644  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_ELEVATOR , "elevator");
645  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_AIR_RUDDER , "rudderair");
646  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_PERMANENT , "permanent");
647  PropAnimFlag(m_stream, anim.source, join, Animation::SOURCE_EVENT , "event");
648 
649  m_stream << ", mode: ";
650  join = false;
651  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_ROTATION_X , "x-rotation");
652  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_ROTATION_Y , "y-rotation");
653  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_ROTATION_Z , "z-rotation");
654  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_OFFSET_X , "x-offset");
655  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_OFFSET_Y , "y-offset");
656  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_OFFSET_Z , "z-offset");
657 
658  // Solo flags
659  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_AUTO_ANIMATE, " autoanimate", ',');
660  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_NO_FLIP , " noflip" , ',');
661  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_BOUNCE , " bounce" , ',');
662  PropAnimFlag(m_stream, anim.mode, join, Animation::MODE_EVENT_LOCK , " eventlock" , ',');
663 
665  {
666  m_stream << ", event: " << anim.event_name;
667  }
668  m_stream << endl;
669 }
670 
672 {
673  if (module->flexbodies.empty())
674  {
675  return;
676  }
677  m_stream << "flexbodies" << endl;
678  auto end_itor = module->flexbodies.end();
679  for (auto itor = module->flexbodies.begin(); itor != end_itor; ++itor)
680  {
681  this->ExportDocComment(module, Keyword::FLEXBODIES, std::distance(module->flexbodies.begin(), itor));
682 
683  RigDef::Flexbody* def = &*itor;
684 
685  // Prop-like line
687  << ", " << setw(m_node_id_width) << def->x_axis_node.Str()
688  << ", " << setw(m_node_id_width) << def->y_axis_node.Str()
689  << ", " << setw(m_float_width) << def->offset.x
690  << ", " << setw(m_float_width) << def->offset.y
691  << ", " << setw(m_float_width) << def->offset.z
692  << ", " << setw(m_float_width) << def->rotation.x
693  << ", " << setw(m_float_width) << def->rotation.y
694  << ", " << setw(m_float_width) << def->rotation.z
695  << ", " << def->mesh_name
696  << endl;
697 
698  // Forset line
699  m_stream << m_dataline_indentstr << "forset ";
700  auto forset_end = def->node_list.end();
701  auto forset_itor = def->node_list.begin();
702  bool first = true;
703  for (; forset_itor != forset_end; ++forset_itor)
704  {
705  if (!first)
706  {
707  m_stream << ", ";
708  }
709  m_stream << forset_itor->Str();
710  first = false;
711  }
712  m_stream
713  << endl;
714 
715  // Animations
716  auto anim_end = def->animations.end();
717  for (auto anim_itor = def->animations.begin(); anim_itor != anim_end; ++anim_itor)
718  {
719  ProcessDirectiveAddAnimation(*anim_itor);
720  }
721  }
722  m_stream << endl; // Empty line
723 }
724 
726 {
727  if (module->props.empty())
728  {
729  return;
730  }
731  m_stream << "props" << endl;
732  auto end_itor = module->props.end();
733  for (auto itor = module->props.begin(); itor != end_itor; ++itor)
734  {
735  this->ExportDocComment(module, Keyword::PROPS, std::distance(module->props.begin(), itor));
736 
737  RigDef::Prop & def = *itor;
738 
739  m_stream << "\t" << setw(m_node_id_width) << def.reference_node.Str()
740  << ", " << setw(m_node_id_width) << def.x_axis_node.Str()
741  << ", " << setw(m_node_id_width) << def.y_axis_node.Str()
742  << ", " << setw(m_float_width) << def.offset.x
743  << ", " << setw(m_float_width) << def.offset.y
744  << ", " << setw(m_float_width) << def.offset.z
745  << ", " << setw(m_float_width) << def.rotation.x
746  << ", " << setw(m_float_width) << def.rotation.y
747  << ", " << setw(m_float_width) << def.rotation.z
748  << ", " << def.mesh_name;
749 
750  // Special props
751  if (def.special == SpecialProp::BEACON)
752  {
753  m_stream
755  << ", " << def.special_prop_beacon.color.r
756  << ", " << def.special_prop_beacon.color.g
757  << ", " << def.special_prop_beacon.color.b;
758  }
760  {
761  m_stream << ", " << def.special_prop_dashboard.mesh_name; // The steering wheel mesh
763  {
764  m_stream
765  << ", " << def.special_prop_dashboard.offset.x
766  << ", " << def.special_prop_dashboard.offset.y
767  << ", " << def.special_prop_dashboard.offset.z
768  << ", " << def.special_prop_dashboard.rotation_angle;
769  }
770  }
771 
772  m_stream << endl;
773 
774  // Animations
775  auto anim_end = def.animations.end();
776  for (auto anim_itor = def.animations.begin(); anim_itor != anim_end; ++anim_itor)
777  {
778  ProcessDirectiveAddAnimation(*anim_itor);
779  }
780  }
781  m_stream << endl; // Empty line
782 }
783 
785 {
786  if (module->materialflarebindings.empty())
787  {
788  return;
789  }
790  m_stream << "materialflarebindings" << endl;
791  auto end_itor = module->materialflarebindings.end();
792  for (auto itor = module->materialflarebindings.begin(); itor != end_itor; ++itor)
793  {
794  RigDef::MaterialFlareBinding & def = *itor;
796  << endl;
797  }
798  m_stream << endl; // Empty line
799 }
800 
802 {
803  if (module->flares2.empty())
804  {
805  return;
806  }
807  m_stream << "flares2" << endl;
808  auto end_itor = module->flares2.end();
809  for (auto itor = module->flares2.begin(); itor != end_itor; ++itor)
810  {
811  this->ExportDocComment(module, Keyword::FLARES2, std::distance(module->flares2.begin(), itor));
812 
813  RigDef::Flare2 & def = *itor;
814 
816  << ", " << setw(m_node_id_width) << def.node_axis_x.Str()
817  << ", " << setw(m_node_id_width) << def.node_axis_y.Str()
818  << ", " << setw(m_float_width) << def.offset.x
819  << ", " << setw(m_float_width) << def.offset.y
820  << ", " << setw(m_float_width) << def.offset.z
821  << ", " << (char)def.type
822  << ", " << setw(2) << def.control_number
823  << ", " << setw(4) << def.blink_delay_milis
824  << ", " << setw(m_float_width) << def.size
825  << ", " << def.material_name
826  << endl;
827  }
828  m_stream << endl; // Empty line
829 }
830 
832 {
833  if (module->managedmaterials.empty())
834  {
835  return;
836  }
837 
838  // Calc column widths
839  size_t name_w = 0, type_w = 0, tex1_w = 0, tex2_w = 1, tex3_w = 1; // Handle space for '-' empty tex marker
840  for (ManagedMaterial& mm: module->managedmaterials)
841  {
842  name_w = std::max(name_w, mm.name.length());
843  type_w = std::max(type_w, strlen(RigDef::ManagedMaterial::TypeToStr(mm.type)));
844  tex1_w = std::max(tex1_w, mm.diffuse_map.size());
845  tex2_w = std::max(tex2_w, mm.damaged_diffuse_map.length());
846  tex3_w = std::max(tex3_w, mm.specular_map.length());
847  }
848 
849  m_stream << "managedmaterials" << std::left << endl; // Set left alignment. WARNING - PERSISTENT!
850  bool first = true;
851  ManagedMaterialsOptions mm_options;
852  for (ManagedMaterial& def: module->managedmaterials)
853  {
854  if (first || (mm_options.double_sided != def.options.double_sided))
855  {
856  mm_options.double_sided = def.options.double_sided;
857  m_stream << "set_managedmaterials_options " << (int) mm_options.double_sided
858  << endl;
859  }
860 
862  << setw(name_w) << def.name << " "
863  << setw(type_w) << RigDef::ManagedMaterial::TypeToStr(def.type) << " "
864  << setw(tex1_w) << def.diffuse_map << " ";
865 
866  // Damage diffuse map - empty column if not applicable
868  {
869  m_stream << setw(tex2_w) << (def.damaged_diffuse_map.empty() ? "-" : def.damaged_diffuse_map) << " ";
870  }
871  else
872  {
873  m_stream << setw(tex2_w) << "" << " ";
874  }
875 
876  m_stream << setw(tex3_w) << (def.specular_map.empty() ? "-" : def.specular_map);
877 
878  first = false;
879  m_stream
880  << endl;
881  }
882  m_stream << std::right; // Reset to default alignment
883  m_stream << endl; // Empty line
884 }
885 
887 {
888  if (module->collisionboxes.empty())
889  {
890  return;
891  }
892  m_stream << "collisionboxes" << endl;
893  auto end_itor = module->collisionboxes.end();
894  for (auto itor = module->collisionboxes.begin(); itor != end_itor; ++itor)
895  {
896  this->ExportDocComment(module, Keyword::COLLISIONBOXES, std::distance(module->collisionboxes.begin(), itor));
897 
898  RigDef::CollisionBox & def = *itor;
899 
900  auto nodes_end = def.nodes.end();
901  auto node_itor = def.nodes.begin();
902  m_stream << node_itor->Str();
903  ++node_itor;
904  for (; node_itor != nodes_end; ++node_itor)
905  {
906  m_stream << ", " << node_itor->Str();
907  }
908 
909  m_stream << endl;
910  }
911  m_stream << endl; // Empty line
912 }
913 
915 {
916  if (module->axles.empty())
917  {
918  return;
919  }
920  m_stream << "axles" << endl;
921  auto end_itor = module->axles.end();
922  for (auto itor = module->axles.begin(); itor != end_itor; ++itor)
923  {
924  this->ExportDocComment(module, Keyword::AXLES, std::distance(module->axles.begin(), itor));
925 
926  RigDef::Axle & def = *itor;
927 
929  << "w1(" << def.wheels[0][0].Str() << " " << def.wheels[0][1].Str() << "), "
930  << "w2(" << def.wheels[1][0].Str() << " " << def.wheels[1][1].Str() << ")";
931  if (! def.options.empty())
932  {
933  m_stream << ", d(";
934  auto end = def.options.end();
935  for (auto itor = def.options.begin(); itor != end; ++itor)
936  {
937  m_stream << (char)*itor;
938  }
939  m_stream << ")";
940  }
941  m_stream << endl;
942  }
943  m_stream << endl; // Empty line
944 }
945 
947 {
948  if (module->interaxles.empty())
949  {
950  return;
951  }
952  m_stream << "interaxles" << endl;
953  auto end_itor = module->interaxles.end();
954  for (auto itor = module->interaxles.begin(); itor != end_itor; ++itor)
955  {
956  this->ExportDocComment(module, Keyword::INTERAXLES, std::distance(module->interaxles.begin(), itor));
957 
958  RigDef::InterAxle & def = *itor;
959 
961  << def.a1 << ", "
962  << def.a2;
963  if (! def.options.empty())
964  {
965  m_stream << ", d(";
966  auto end = def.options.end();
967  for (auto itor = def.options.begin(); itor != end; ++itor)
968  {
969  m_stream << (char)*itor;
970  }
971  m_stream << ")";
972  }
973  m_stream << endl;
974  }
975  m_stream << endl; // Empty line
976 }
977 
979 {
980  if (module->transfercase.size() == 0)
981  {
982  return;
983  }
984  TransferCase& def = module->transfercase[module->transfercase.size() - 1];
985 
986  m_stream << "transfercase\t"
987  << def.a1 << ", "
988  << def.a2 << ", "
989  << def.has_2wd << ", "
990  << def.has_2wd_lo;
991  for (float gear_ratio : def.gear_ratios)
992  {
993  m_stream << ", " << gear_ratio;
994  }
995  m_stream << endl << endl;
996 }
997 
999 {
1000  if (module->cruisecontrol.size() == 0)
1001  {
1002  return;
1003  }
1004 
1005  RigDef::CruiseControl& cruisecontrol = module->cruisecontrol[module->cruisecontrol.size() - 1];
1006 
1007  m_stream << "cruisecontrol "
1008  << cruisecontrol.min_speed << ", "
1009  << (int) cruisecontrol.autobrake
1010  << endl << endl;
1011 
1012 }
1013 
1015 {
1016  if (module->speedlimiter.size() == 0)
1017  {
1018  return;
1019  }
1020  m_stream << "speedlimiter "
1021  << module->speedlimiter[module->speedlimiter.size() - 1].max_speed
1022  << endl << endl;
1023 }
1024 
1026 {
1027  if (module->torquecurve.size() == 0)
1028  {
1029  return;
1030  }
1031  m_stream << "torquecurve" << endl;
1032  if (module->torquecurve[0].predefined_func_name.empty())
1033  {
1034  auto itor_end = module->torquecurve[0].samples.end();
1035  auto itor = module->torquecurve[0].samples.begin();
1036  for (; itor != itor_end; ++itor)
1037  {
1038  m_stream << m_dataline_indentstr << itor->power << ", " << itor->torque_percent;
1039  }
1040  }
1041  else
1042  {
1043  m_stream << m_dataline_indentstr << module->torquecurve[0].predefined_func_name;
1044  }
1045  m_stream << endl; // Empty line
1046 }
1047 
1049 {
1050  if (module->particles.empty())
1051  {
1052  return;
1053  }
1054  m_stream << "particles" << endl;
1055  auto end_itor = module->particles.end();
1056  for (auto itor = module->particles.begin(); itor != end_itor; ++itor)
1057  {
1058  this->ExportDocComment(module, Keyword::PARTICLES, std::distance(module->particles.begin(), itor));
1059 
1060  RigDef::Particle & def = *itor;
1061 
1063  << setw(m_node_id_width) << def.emitter_node.Str() << ", "
1064  << setw(m_node_id_width) << def.reference_node.Str() << ", "
1065  << def.particle_system_name;
1066  m_stream << endl;
1067  }
1068  m_stream << endl; // Empty line
1069 }
1070 
1072 {
1073  if (module->ropables.empty())
1074  {
1075  return;
1076  }
1077  m_stream << "ropables" << endl;
1078  auto end_itor = module->ropables.end();
1079  for (auto itor = module->ropables.begin(); itor != end_itor; ++itor)
1080  {
1081  this->ExportDocComment(module, Keyword::ROPABLES, std::distance(module->ropables.begin(), itor));
1082 
1083  RigDef::Ropable & def = *itor;
1084 
1086  << ", " << def.group
1087  << ", " << (int) def.has_multilock;
1088  m_stream << endl;
1089  }
1090  m_stream << endl; // Empty line
1091 }
1092 
1094 {
1095  if (module->ties.empty())
1096  {
1097  return;
1098  }
1099  m_stream << "ties" << endl;
1100  auto end_itor = module->ties.end();
1101  for (auto itor = module->ties.begin(); itor != end_itor; ++itor)
1102  {
1103  this->ExportDocComment(module, Keyword::TIES, std::distance(module->ties.begin(), itor));
1104 
1105  RigDef::Tie & def = *itor;
1106 
1108  << ", " << setw(m_float_width) << def.max_reach_length
1109  << ", " << setw(m_float_width) << def.auto_shorten_rate
1110  << ", " << setw(m_float_width) << def.min_length
1111  << ", " << setw(m_float_width) << def.max_length
1112  << ", " << (BITMASK_IS_1(def.options, Tie::OPTION_i_INVISIBLE) ? "i" : "n")
1113  << ", " << (BITMASK_IS_1(def.options, Tie::OPTION_s_DISABLE_SELF_LOCK) ? "s" : "")
1114  << ", " << setw(m_float_width) << def.max_stress
1115  << ", " << def.group;
1116  m_stream << endl;
1117  }
1118  m_stream << endl; // Empty line
1119 }
1120 
1122 {
1123  if (module->fixes.empty())
1124  {
1125  return;
1126  }
1127  m_stream << "fixes" << endl;
1128  auto end_itor = module->fixes.end();
1129  for (auto itor = module->fixes.begin(); itor != end_itor; ++itor)
1130  {
1131  m_stream << m_dataline_indentstr << setw(m_node_id_width) << itor->Str();
1132  }
1133  m_stream << endl; // Empty line
1134 }
1135 
1137 {
1138  if (module->ropes.empty())
1139  {
1140  return;
1141  }
1142  m_stream << "ropes" << endl;
1143  auto end_itor = module->ropes.end();
1144  bool first = true;
1145  BeamDefaults* beam_defaults = nullptr;
1146  for (auto itor = module->ropes.begin(); itor != end_itor; ++itor)
1147  {
1148  this->ExportDocComment(module, Keyword::ROPES, std::distance(module->ropes.begin(), itor));
1149 
1150  RigDef::Rope & def = *itor;
1151 
1152  if (first || (def.beam_defaults.get() != beam_defaults))
1153  {
1155  }
1156 
1158  << setw(m_node_id_width) << def.root_node.Str() << ", "
1159  << setw(m_node_id_width) << def.end_node.Str();
1160  if (def.invisible)
1161  {
1162  m_stream << ", i";
1163  }
1164  first = false;
1165  m_stream << endl;
1166  }
1167  m_stream << endl; // Empty line
1168 }
1169 
1171 {
1172  if (module->railgroups.empty())
1173  {
1174  return;
1175  }
1176  m_stream << "railgroups" << endl << endl;
1177  auto end_itor = module->railgroups.end();
1178  for (auto itor = module->railgroups.begin(); itor != end_itor; ++itor)
1179  {
1180  this->ExportDocComment(module, Keyword::RAILGROUPS, std::distance(module->railgroups.begin(), itor));
1181 
1182  RigDef::RailGroup & def = *itor;
1183 
1184  m_stream << m_dataline_indentstr << def.id;
1185  auto node_end = def.node_list.end();
1186  for (auto node_itor = def.node_list.begin(); node_itor != node_end; ++node_itor)
1187  {
1188  m_stream << ", " << node_itor->start.Str();
1189  if (node_itor->IsRange())
1190  {
1191  m_stream << " - " << node_itor->end.Str();
1192  }
1193  }
1194  m_stream << endl;
1195  }
1196  m_stream << endl; // Empty line
1197 }
1198 
1200 {
1201  if (module->slidenodes.empty())
1202  {
1203  return;
1204  }
1205  m_stream << "slidenodes" << endl << endl;
1206  auto end_itor = module->slidenodes.end();
1207  for (auto itor = module->slidenodes.begin(); itor != end_itor; ++itor)
1208  {
1209  this->ExportDocComment(module, Keyword::SLIDENODES, std::distance(module->slidenodes.begin(), itor));
1210 
1211  RigDef::SlideNode & def = *itor;
1212 
1214 
1215  // Define rail - either list of nodes, or raigroup ID
1216  if (!def.rail_node_ranges.empty())
1217  {
1218  auto end = def.rail_node_ranges.end();
1219  auto itor = def.rail_node_ranges.begin();
1220  for (; itor != end; ++itor)
1221  {
1222  m_stream << ", " << itor->start.Str();
1223  if (itor->IsRange())
1224  {
1225  m_stream << " - " << itor->end.Str();
1226  }
1227  }
1228  }
1229  else
1230  {
1231  m_stream << ", g" << def.railgroup_id;
1232  }
1233 
1234  // Optional args
1235  if (def._spring_rate_set) { m_stream << ", s" << def.spring_rate; }
1236  if (def._break_force_set) { m_stream << ", b" << def.break_force; }
1237  if (def._tolerance_set) { m_stream << ", t" << def.tolerance; }
1238  if (def._attachment_rate_set) { m_stream << ", r" << def.attachment_rate; }
1239  if (def._max_attach_dist_set) { m_stream << ", d" << def.max_attach_dist; }
1240 
1241  // Constraint flags (cX)
1246 
1247  m_stream << endl;
1248  }
1249  m_stream << endl; // Empty line
1250 }
1251 
1253 {
1254  if (module->hooks.empty())
1255  {
1256  return;
1257  }
1258  m_stream << "hooks" << endl << endl;
1259  auto end_itor = module->hooks.end();
1260  for (auto itor = module->hooks.begin(); itor != end_itor; ++itor)
1261  {
1262  this->ExportDocComment(module, Keyword::HOOKS, std::distance(module->hooks.begin(), itor));
1263 
1264  RigDef::Hook & def = *itor;
1265 
1266  m_stream << m_dataline_indentstr << setw(m_node_id_width) << def.node.Str();
1267 
1268  // Boolean options
1269  if (def.flag_auto_lock) { m_stream << ", auto-lock"; }
1270  if (def.flag_no_disable) { m_stream << ", nodisable"; }
1271  if (def.flag_no_rope) { m_stream << ", norope"; }
1272  if (def.flag_self_lock) { m_stream << ", self-lock"; }
1273  if (def.flag_visible) { m_stream << ", visible"; }
1274 
1275  // Key-value options
1276  m_stream
1277  << ", hookrange: " << setw(m_float_width) << def.option_hook_range
1278  << ", speedcoef: " << setw(m_float_width) << def.option_speed_coef
1279  << ", maxforce: " << setw(m_float_width) << def.option_max_force
1280  << ", hookgroup: " << setw(4) << def.option_hookgroup
1281  << ", lockgroup: " << setw(4) << def.option_lockgroup
1282  << ", timer: " << setw(m_float_width) << def.option_timer
1283  << ", shortlimit: " << setw(m_float_width) << def.option_min_range_meters;
1284 
1285  m_stream << endl;
1286  }
1287  m_stream << endl; // Empty line
1288 }
1289 
1291 {
1292  if (module->lockgroups.empty())
1293  {
1294  return;
1295  }
1296  m_stream << "lockgroups" << endl << endl;
1297  auto end_itor = module->lockgroups.end();
1298  for (auto itor = module->lockgroups.begin(); itor != end_itor; ++itor)
1299  {
1300  this->ExportDocComment(module, Keyword::LOCKGROUPS, std::distance(module->lockgroups.begin(), itor));
1301 
1302  RigDef::Lockgroup & def = *itor;
1303 
1305  auto nodes_end = def.nodes.end();
1306  for (auto nodes_itor = def.nodes.begin(); nodes_itor != nodes_end; ++nodes_itor)
1307  {
1308  m_stream << ", " << nodes_itor->Str();
1309  }
1310  m_stream << endl;
1311  }
1312  m_stream << endl; // Empty line
1313 }
1314 
1316 {
1317  if (module->triggers.empty())
1318  {
1319  return;
1320  }
1321  m_stream << "animators" << endl << endl;
1322  auto end_itor = module->triggers.end();
1323  for (auto itor = module->triggers.begin(); itor != end_itor; ++itor)
1324  {
1325  this->ExportDocComment(module, Keyword::TRIGGERS, std::distance(module->triggers.begin(), itor));
1326 
1327  RigDef::Trigger & def = *itor;
1328 
1330  << setw(m_node_id_width) << def.nodes[0].Str() << ", "
1331  << setw(m_node_id_width) << def.nodes[1].Str() << ", "
1332  << setw(m_float_width) << def.contraction_trigger_limit << ", "
1333  << setw(m_float_width) << def.expansion_trigger_limit << ", "
1334  << setw(4) << def.shortbound_trigger_action << ", "
1335  << setw(4) << def.longbound_trigger_action << ", ";
1336 
1348 
1349  m_stream << " " << def.boundary_timer;
1350  m_stream << endl;
1351  }
1352  m_stream << endl; // Empty line
1353 }
1354 
1355 #define ANIMATOR_ADD_FLAG(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR) \
1356  if (AND_VAR) { m_stream << " | "; } \
1357  if (BITMASK_IS_1((DEF_VAR).flags, RigDef::Animator::BITMASK_CONST)) { \
1358  AND_VAR = true; \
1359  m_stream << NAME_STR; \
1360  }
1361 
1362 #define ANIMATOR_ADD_AERIAL_FLAG(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR) \
1363  if (AND_VAR) { m_stream << " | "; } \
1364  if (BITMASK_IS_1((DEF_VAR).aero_animator.flags, RigDef::AeroAnimator::BITMASK_CONST)) { \
1365  AND_VAR = true; \
1366  m_stream << NAME_STR << DEF_VAR.aero_animator.engine_idx + 1; \
1367  }
1368 
1369 #define ANIMATOR_ADD_LIMIT(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR, VALUE) \
1370  if (AND_VAR) { m_stream << " | "; } \
1371  if (BITMASK_IS_1((DEF_VAR).aero_animator.flags, RigDef::Animator::BITMASK_CONST)) { \
1372  AND_VAR = true; \
1373  m_stream << NAME_STR << ": " << VALUE; \
1374  }
1375 
1377 {
1378  if (module->animators.empty())
1379  {
1380  return;
1381  }
1382  m_stream << "animators" << endl << endl;
1383  auto end_itor = module->animators.end();
1384  for (auto itor = module->animators.begin(); itor != end_itor; ++itor)
1385  {
1386  this->ExportDocComment(module, Keyword::ANIMATORS, std::distance(module->animators.begin(), itor));
1387 
1388  RigDef::Animator & def = *itor;
1389 
1391  << setw(m_node_id_width) << def.nodes[0].Str() << ", "
1392  << setw(m_node_id_width) << def.nodes[1].Str() << ", "
1393  << setw(m_float_width) << def.lenghtening_factor << ", ";
1394 
1395  // Options
1396  bool bAnd = false;
1397  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_VISIBLE , "vis")
1398  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_INVISIBLE , "inv")
1399  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_AIRSPEED , "airspeed")
1400  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_VERTICAL_VELOCITY, "vvi")
1401  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ALTIMETER_100K , "altimeter100k")
1402  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ALTIMETER_10K , "altimeter10k")
1403  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ALTIMETER_1K , "altimeter1k")
1404  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ANGLE_OF_ATTACK , "aoa")
1405  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_FLAP , "flap")
1406  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_AIR_BRAKE , "airbrake")
1407  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ROLL , "roll")
1408  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_PITCH , "pitch")
1409  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_BRAKES , "brakes")
1410  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_ACCEL , "accel")
1411  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_CLUTCH , "clutch")
1412  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_SPEEDO , "speedo")
1413  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_TACHO , "tacho")
1414  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_TURBO , "turbo")
1415  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_PARKING , "parking")
1416  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_SHIFT_LEFT_RIGHT , "shifterman1")
1417  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_SHIFT_BACK_FORTH , "shifterman2")
1418  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_SEQUENTIAL_SHIFT , "sequential")
1419  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_GEAR_SELECT , "shifterlin")
1420  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_TORQUE , "torque")
1421  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_DIFFLOCK , "difflock")
1422  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_BOAT_RUDDER , "rudderboat")
1423  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_BOAT_THROTTLE , "throttleboat")
1424  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_SHORT_LIMIT , "shortlimit")
1425  ANIMATOR_ADD_FLAG(def, bAnd, OPTION_LONG_LIMIT , "longlimit")
1426 
1427  ANIMATOR_ADD_AERIAL_FLAG(def, bAnd, OPTION_THROTTLE , "throttle")
1428  ANIMATOR_ADD_AERIAL_FLAG(def, bAnd, OPTION_RPM , "rpm")
1429  ANIMATOR_ADD_AERIAL_FLAG(def, bAnd, OPTION_TORQUE , "aerotorq")
1430  ANIMATOR_ADD_AERIAL_FLAG(def, bAnd, OPTION_PITCH , "aeropit")
1431  ANIMATOR_ADD_AERIAL_FLAG(def, bAnd, OPTION_STATUS , "aerostatus")
1432 
1433  ANIMATOR_ADD_LIMIT(def, bAnd, OPTION_SHORT_LIMIT , "shortlimit", def.short_limit)
1434  ANIMATOR_ADD_LIMIT(def, bAnd, OPTION_LONG_LIMIT , "longlimit", def.long_limit)
1435  m_stream << endl;
1436  }
1437  m_stream << endl; // Empty line
1438 }
1439 
1441 {
1442  if (module->contacters.empty())
1443  {
1444  return;
1445  }
1446  m_stream << "contacters" << endl << endl;
1447 
1448  for (RigDef::Node::Ref& node: module->contacters)
1449  {
1450  m_stream << setw(m_node_id_width) << node.Str() << endl;
1451  }
1452 
1453  m_stream << endl; // Empty line
1454 }
1455 
1457 {
1458  if (module->rotators.empty())
1459  {
1460  return;
1461  }
1462  m_stream << "rotators" << endl << endl;
1463  auto end_itor = module->rotators.end();
1464  for (auto itor = module->rotators.begin(); itor != end_itor; ++itor)
1465  {
1466  this->ExportDocComment(module, Keyword::ROTATORS, std::distance(module->rotators.begin(), itor));
1467 
1468  Rotator & def = *itor;
1469 
1470  // Axis nodes
1471  m_stream
1472  << setw(m_node_id_width) << def.axis_nodes[0].Str() << ", "
1473  << setw(m_node_id_width) << def.axis_nodes[1].Str() << ", ";
1474 
1475  // Baseplate nodes
1476  for (int i = 0; i < 4; ++i)
1477  {
1478  m_stream << setw(m_node_id_width) << def.base_plate_nodes[i].Str() << ", ";
1479  }
1480 
1481  // Rotating plate nodes
1482  for (int i = 0; i < 4; ++i)
1483  {
1484  m_stream << setw(m_node_id_width) << def.rotating_plate_nodes[i].Str() << ", ";
1485  }
1486 
1487  // Attributes
1488  m_stream << setw(m_float_width) << def.rate << ", "
1489  << setw(4) << def.spin_left_key << ", "
1490  << setw(4) << def.spin_right_key << ", ";
1491 
1492  // Inertia
1493  m_stream
1494  << setw(m_float_width) << def.inertia.start_delay_factor << ", "
1495  << setw(m_float_width) << def.inertia.stop_delay_factor << ", "
1496  << def.inertia.start_function << ", "
1497  << def.inertia.stop_function << ", "
1498  << def.engine_coupling << ", "
1499  << (def.needs_engine ? "true" : "false");
1500  m_stream << endl;
1501  }
1502  m_stream << endl; // Empty line
1503 }
1504 
1506 {
1507  if (module->rotators2.empty())
1508  {
1509  return;
1510  }
1511 
1512  // Calc column widths
1513  size_t desc_w = 0, startf_w = 0, stopf_w = 0;
1514  for (RigDef::Rotator2& def: module->rotators2)
1515  {
1516  desc_w = std::max(desc_w, def.description.length());
1517  startf_w = std::max(startf_w, def.inertia.start_function.length());
1518  stopf_w = std::max(stopf_w, def.inertia.stop_function.length());
1519  }
1520 
1521  // Write data
1522  m_stream << "rotators2" << endl << endl;
1523  auto end_itor = module->rotators2.end();
1524  for (auto itor = module->rotators2.begin(); itor != end_itor; ++itor)
1525  {
1526  this->ExportDocComment(module, Keyword::ROTATORS, std::distance(module->rotators2.begin(), itor));
1527 
1528  Rotator2& def = *itor;
1529  // Axis nodes
1530  m_stream
1531  << setw(m_node_id_width)<< def.axis_nodes[0].Str() << ", "
1532  << setw(m_node_id_width)<< def.axis_nodes[1].Str() << ", ";
1533 
1534  // Baseplate nodes
1535  for (int i = 0; i < 4; ++i)
1536  {
1537  m_stream << setw(m_node_id_width) << def.base_plate_nodes[i].Str() << ", ";
1538  }
1539 
1540  // Rotating plate nodes
1541  for (int i = 0; i < 4; ++i)
1542  {
1543  m_stream << setw(m_node_id_width) << def.rotating_plate_nodes[i].Str() << ", ";
1544  }
1545 
1546  // Attributes
1547  m_stream
1548  << setw(m_float_width) << def.rate << ", "
1549  << def.spin_left_key << ", "
1550  << def.spin_right_key << ", "
1551  << setw(m_float_width) << def.rotating_force << ", "
1552  << setw(m_float_width) << def.tolerance << ", "
1553  << setw(desc_w) << def.description << ", ";
1554 
1555  // Inertia
1556  m_stream
1557  << setw(m_float_width) << def.inertia.start_delay_factor << ", "
1558  << setw(m_float_width) << def.inertia.stop_delay_factor << ", "
1559  << setw(startf_w) << def.inertia.start_function << ", "
1560  << setw(stopf_w) << def.inertia.stop_function << ", "
1561  << setw(m_float_width) << def.engine_coupling << ", "
1562  << (def.needs_engine ? "true" : "false");
1563  m_stream << endl;
1564  }
1565  m_stream << endl; // Empty line
1566 }
1567 
1569 {
1570  if (module->flexbodywheels.empty())
1571  {
1572  return;
1573  }
1574 
1575  this->ResetPresets();
1576 
1577  m_stream << "flexbodywheels" << endl << endl;
1578  auto end_itor = module->flexbodywheels.end();
1579  for (auto itor = module->flexbodywheels.begin(); itor != end_itor; ++itor)
1580  {
1581  this->UpdatePresets(itor->beam_defaults.get(), itor->node_defaults.get(), nullptr);
1582 
1583  this->ExportDocComment(module, Keyword::FLEXBODYWHEELS, std::distance(module->flexbodywheels.begin(), itor));
1585  << setw(m_float_width) << itor->tyre_radius << ", "
1586  << setw(m_float_width) << itor->rim_radius << ", "
1587  << setw(m_float_width) << itor->width << ", "
1588  << setw(3) << itor->num_rays << ", "
1589  << setw(m_node_id_width) << itor->nodes[0].Str() << ", "
1590  << setw(m_node_id_width) << itor->nodes[1].Str() << ", "
1591  << setw(m_node_id_width) << RigidityNodeToStr(itor->rigidity_node) << ", "
1592  << setw(3) << (int)itor->braking << ", "
1593  << setw(3) << (int)itor->propulsion << ", "
1594  << setw(m_node_id_width) << itor->reference_arm_node.Str() << ", "
1595  << setw(m_float_width) << itor->mass << ", "
1596  << setw(m_float_width) << itor->tyre_springiness << ", "
1597  << setw(m_float_width) << itor->tyre_damping << ", "
1598  << setw(m_float_width) << itor->rim_springiness << ", "
1599  << setw(m_float_width) << itor->rim_damping << ", "
1600  << (static_cast<char>(itor->side)) << ", "
1601  << itor->rim_mesh_name << " " // Separator = space!
1602  << itor->tyre_mesh_name
1603  << endl;
1604  }
1605 
1606  m_stream << endl; // Empty line
1607 }
1608 
1610 {
1611  if (module->tractioncontrol.size() == 0) { return; }
1612 
1613  RigDef::TractionControl& def = module->tractioncontrol[module->tractioncontrol.size() - 1];
1614 
1615  m_stream << "TractionControl "
1616  << setw(m_float_width) << def.regulation_force << ", "
1617  << setw(m_float_width) << def.wheel_slip << ", "
1618  << setw(m_float_width) << def.fade_speed << ", "
1619  << setw(m_float_width) << def.pulse_per_sec << ", "
1620  << "mode: " << (def.attr_is_on ? "ON" : "OFF");
1621 
1622  // Modes
1623  if (def.attr_no_dashboard) { m_stream << " & NODASH "; }
1624  if (def.attr_no_toggle) { m_stream << " & NOTOGGLE "; }
1625 
1626  m_stream << endl << endl; // Empty line
1627 }
1628 
1630 {
1631  if (module->brakes.size() == 0) { return; }
1632 
1633  Brakes& brakes = module->brakes[module->brakes.size() - 1];
1634 
1635  m_stream << "brakes\n\t"
1636  << setw(m_float_width) << brakes.default_braking_force << ", "
1637  << setw(m_float_width) << brakes.parking_brake_force;
1638 
1639  m_stream << endl << endl; // Empty line
1640 }
1641 
1643 {
1644  if (module->antilockbrakes.size() == 0) { return; }
1645 
1646  RigDef::AntiLockBrakes* alb = &module->antilockbrakes[module->antilockbrakes.size() - 1];
1647 
1648  m_stream << "AntiLockBrakes "
1649  << setw(m_float_width) << alb->regulation_force << ", "
1650  << setw(m_float_width) << alb->min_speed << ", "
1651  << setw(m_float_width) << alb->pulse_per_sec << ", "
1652  << "mode: " << (alb->attr_is_on ? "ON" : "OFF");
1653  // Modes
1654  if (alb->attr_no_dashboard) { m_stream << " & NODASH "; }
1655  if (alb->attr_no_toggle) { m_stream << " & NOTOGGLE "; }
1656 
1657  m_stream << endl << endl; // Empty line
1658 }
1659 
1661 {
1662  if (module->engine.size() == 0)
1663  {
1664  return;
1665  }
1666 
1667  Engine& engine = module->engine[module->engine.size() - 1];
1668 
1669  m_stream << "engine"
1670  "\n;\t"
1671  "ShiftDownRPM,"
1672  " ShiftUpRPM,"
1673  " Torque,"
1674  " GlobalGear,"
1675  " ReverseGear,"
1676  " NeutralGear,"
1677  " Forward gears...\n\t"
1678  << setw(12) << engine.shift_down_rpm << ", "
1679  << setw(10) << engine.shift_up_rpm << ", "
1680  << setw(10) << engine.torque << ", "
1681  << setw(10) << engine.global_gear_ratio << ", "
1682  << setw(11) << engine.reverse_gear_ratio << ", "
1683  << setw(11) << engine.neutral_gear_ratio;
1684 
1685  auto itor = engine.gear_ratios.begin();
1686  auto end = engine.gear_ratios.end();
1687  for (; itor != end; ++itor)
1688  {
1689  m_stream << ", " << *itor;
1690  }
1691  m_stream << ", -1.0" /*terminator*/ << endl << endl;
1692 }
1693 
1695 {
1696  if (module->engoption.size() == 0)
1697  {
1698  return;
1699  }
1700 
1701  Engoption& engoption = module->engoption[module->engoption.size() - 1];
1702 
1703  m_stream << "engoption"
1704  "\n;\t"
1705  "EngInertia,"
1706  " EngineType,"
1707  " ClutchForce,"
1708  " ShiftTime,"
1709  " ClutchTime,"
1710  " PostShiftTime,"
1711  " StallRPM,"
1712  " IdleRPM,"
1713  " MaxIdleMixture,"
1714  " MinIdleMixture"
1715  " BrakingForce"
1716  "\n\t"
1717  << setw(10) << engoption.inertia << ", "
1718  << setw(10) << (char)engoption.type << ", "
1719  << setw(11) << engoption.clutch_force << ", "
1720  << setw( 9) << engoption.shift_time << ", "
1721  << setw(10) << engoption.clutch_time << ", "
1722  << setw(13) << engoption.post_shift_time << ", "
1723  << setw( 8) << engoption.stall_rpm << ", "
1724  << setw( 7) << engoption.idle_rpm << ", "
1725  << setw(14) << engoption.max_idle_mixture << ", "
1726  << setw(14) << engoption.min_idle_mixture << ", "
1727  << setw(15) << engoption.braking_torque;
1728 
1729  m_stream << endl << endl; // Empty line
1730 }
1731 
1733 {
1734  if (module->help.size() == 0)
1735  {
1736  return;
1737  }
1738  m_stream << "help\n\t" << module->help[module->help.size() - 1].material << endl << endl;
1739 }
1740 
1742 {
1743  if (module->wheels2.empty())
1744  {
1745  return;
1746  }
1747 
1748  this->ResetPresets();
1749  m_stream << "wheels2" << endl << endl;
1750  auto end_itor = module->wheels2.end();
1751  for (auto itor = module->wheels2.begin(); itor != end_itor; ++itor)
1752  {
1753  this->UpdatePresets(itor->beam_defaults.get(), itor->node_defaults.get(), nullptr);
1754 
1755  this->ExportDocComment(module, Keyword::WHEELS2, std::distance(module->wheels2.begin(), itor));
1757  << setw(m_float_width) << itor->tyre_radius << ", "
1758  << setw(m_float_width) << itor->rim_radius << ", "
1759  << setw(m_float_width) << itor->width << ", "
1760  << setw(3) << itor->num_rays << ", "
1761  << setw(m_node_id_width) << itor->nodes[0].Str() << ", "
1762  << setw(m_node_id_width) << itor->nodes[1].Str() << ", "
1763  << setw(m_node_id_width) << RigidityNodeToStr(itor->rigidity_node) << ", "
1764  << setw(3) << (int)itor->braking << ", "
1765  << setw(3) << (int)itor->propulsion << ", "
1766  << setw(m_node_id_width) << itor->reference_arm_node.Str() << ", "
1767  << setw(m_float_width) << itor->mass << ", "
1768  << setw(m_float_width) << itor->rim_springiness << ", "
1769  << setw(m_float_width) << itor->rim_damping << ", "
1770  << setw(m_float_width) << itor->tyre_springiness << ", "
1771  << setw(m_float_width) << itor->tyre_damping << ", "
1772  << itor->face_material_name << " " // Separator = space!
1773  << itor->band_material_name << " " // Separator = space!
1774  ;
1775  m_stream << endl;
1776  }
1777 
1778  m_stream << endl; // Empty line
1779 }
1780 
1782 {
1783  if (module->wheels.empty())
1784  {
1785  return;
1786  }
1787 
1788  this->ResetPresets();
1789  m_stream << "wheels" << endl << endl;
1790  m_stream << ";\t"
1791  << setw(m_float_width) << "radius, "
1792  << setw(m_float_width) << "width, "
1793  << setw(3) << "nrays, "
1794  << setw(m_node_id_width) << "n1, "
1795  << setw(m_node_id_width) << "n2, "
1796  << setw(m_node_id_width) << "snode, "
1797  << setw(3) << "brk, "
1798  << setw(3) << "pwr, "
1799  << setw(m_node_id_width) << "arm, "
1800  << setw(m_float_width) << "mass, "
1801  << setw(m_float_width) << "spring, "
1802  << setw(m_float_width) << "damp, "
1803  << "facemat, "
1804  << "bandmat";
1805 
1806  auto end_itor = module->wheels.end();
1807  for (auto itor = module->wheels.begin(); itor != end_itor; ++itor)
1808  {
1809  this->UpdatePresets(itor->beam_defaults.get(), itor->node_defaults.get(), nullptr);
1810 
1811  this->ExportDocComment(module, Keyword::WHEELS, std::distance(module->wheels.begin(), itor));
1813  << setw(m_float_width) << itor->radius << ", "
1814  << setw(m_float_width) << itor->width << ", "
1815  << setw(3) << itor->num_rays << ", "
1816  << setw(m_node_id_width) << itor->nodes[0].Str() << ", "
1817  << setw(m_node_id_width) << itor->nodes[1].Str() << ", "
1818  << setw(m_node_id_width) << RigidityNodeToStr(itor->rigidity_node) << ", "
1819  << setw(3) << (int)itor->braking << ", "
1820  << setw(3) << (int)itor->propulsion << ", "
1821  << setw(m_node_id_width) << itor->reference_arm_node.Str() << ", "
1822  << setw(m_float_width) << itor->mass << ", "
1823  << setw(m_float_width) << itor->springiness << ", "
1824  << setw(m_float_width) << itor->damping << ", "
1825  << itor->face_material_name << " " // Separator = space!
1826  << itor->band_material_name << " " // Separator = space!
1827  ;
1828  m_stream << endl;
1829  }
1830 
1831  m_stream << endl; // Empty line
1832 }
1833 
1835 {
1836  this->UpdatePresets(def.beam_defaults.get(), def.node_defaults.get(), nullptr);
1837 
1839  << setw(m_float_width) << def.tyre_radius << ", "
1840  << setw(m_float_width) << def.rim_radius << ", "
1841  << setw(m_float_width) << def.width << ", "
1842  << setw(3) << def.num_rays << ", "
1843  << setw(m_node_id_width) << def.nodes[0].Str() << ", "
1844  << setw(m_node_id_width) << def.nodes[1].Str() << ", "
1845  << setw(m_node_id_width) << RigidityNodeToStr(def.rigidity_node) << ", "
1846  << setw(3) << (int)def.braking << ", "
1847  << setw(3) << (int)def.propulsion << ", "
1848  << setw(m_node_id_width) << def.reference_arm_node.Str() << ", "
1849  << setw(m_float_width) << def.mass << ", "
1850  << setw(m_float_width) << def.spring << ", "
1851  << setw(m_float_width) << def.damping << ", "
1852  << (static_cast<char>(def.side)) << ", "
1853  << def.mesh_name << " " // Separator = space!
1854  << def.material_name;
1855  m_stream << endl;
1856 }
1857 
1859 {
1860  if (module->meshwheels.empty()) { return; }
1861 
1862  this->ResetPresets();
1863 
1864  m_stream << "meshwheels" << "\n\n";
1865 
1866  for (MeshWheel& def: module->meshwheels)
1867  {
1868  this->ExportBaseMeshWheel(def);
1869  }
1870 
1871  m_stream << endl; // Empty line
1872 
1873 }
1874 
1876 {
1877  if (module->meshwheels2.empty()) { return; }
1878 
1879  this->ResetPresets();
1880 
1881  m_stream << "meshwheels2" << "\n\n";
1882 
1883  for (MeshWheel2& def: module->meshwheels2)
1884  {
1885  this->ExportBaseMeshWheel(def);
1886  }
1887 
1888  m_stream << endl; // Empty line
1889 }
1890 
1892 {
1893  if (module->cameras.empty())
1894  {
1895  return;
1896  }
1897 
1898  m_stream << "cameras\n\n";
1899  for (auto& camera: module->cameras)
1900  {
1901  m_stream
1902  << setw(m_node_id_width) << camera.center_node.Str() << ", "
1903  << setw(m_node_id_width) << camera.back_node.Str() << ", "
1904  << setw(m_node_id_width) << camera.left_node.Str() << "\n";
1905  }
1906  m_stream << "\n";
1907 }
1908 
1910 {
1911  if (module->cinecam.empty())
1912  {
1913  return;
1914  }
1915 
1916  m_stream << "cinecam" << endl << endl;
1917 
1918  for (auto itor = module->cinecam.begin(); itor != module->cinecam.end(); ++itor)
1919  {
1920  this->ExportDocComment(module, Keyword::CINECAM, std::distance(module->cinecam.begin(), itor));
1922  << setw(m_float_width) << itor->position.x << ", "
1923  << setw(m_float_width) << itor->position.y << ", "
1924  << setw(m_float_width) << itor->position.z << ", ";
1925  m_stream
1926  << setw(m_node_id_width) << itor->nodes[0].Str() << ", "
1927  << setw(m_node_id_width) << itor->nodes[1].Str() << ", "
1928  << setw(m_node_id_width) << itor->nodes[2].Str() << ", "
1929  << setw(m_node_id_width) << itor->nodes[3].Str() << ", "
1930  << setw(m_node_id_width) << itor->nodes[4].Str() << ", "
1931  << setw(m_node_id_width) << itor->nodes[5].Str() << ", "
1932  << setw(m_node_id_width) << itor->nodes[6].Str() << ", "
1933  << setw(m_node_id_width) << itor->nodes[7].Str() << ", ";
1934  m_stream
1935  << setw(m_float_width) << itor->spring << ", "
1936  << setw(m_float_width) << itor->damping
1937  << endl;
1938  }
1939 
1940  m_stream << endl; // Empty line
1941 }
1942 
1944 {
1945  if (module->beams.empty())
1946  {
1947  return;
1948  }
1949 
1950  // Write beams to file
1951  m_stream << "beams" << endl << endl;
1952 
1953  BeamDefaults* prev_defaults = nullptr;
1954  for (size_t i = 0; i < module->beams.size(); i++)
1955  {
1956  Beam& beam = module->beams[i];
1957  if (prev_defaults != beam.defaults.get())
1958  {
1959  ProcessBeamDefaults(beam.defaults.get());
1960  prev_defaults = beam.defaults.get();
1961  }
1962  this->ExportDocComment(module, Keyword::BEAMS, i);
1963  this->ProcessBeam(beam);
1964  }
1965 
1966  // Empty line
1967  m_stream << endl;
1968 }
1969 
1971 {
1972  if (module->shocks.empty())
1973  {
1974  return;
1975  }
1976 
1977  // Write shocks to file
1978  m_stream << "shocks" << endl << endl;
1979 
1980  BeamDefaults* prev_defaults = nullptr;
1981  for (size_t i = 0; i < module->shocks.size(); i++)
1982  {
1983  Shock& shock = module->shocks[i];
1984  if (prev_defaults != shock.beam_defaults.get())
1985  {
1986  ProcessBeamDefaults(shock.beam_defaults.get());
1987  prev_defaults = shock.beam_defaults.get();
1988  }
1989  this->ExportDocComment(module, Keyword::SHOCKS, i);
1990  this->ProcessShock(shock);
1991  }
1992 
1993  // Empty line
1994  m_stream << endl;
1995 }
1996 
1998 {
1999  if (module->shocks2.empty())
2000  {
2001  return;
2002  }
2003 
2004  // Write shocks2 to file
2005  m_stream << "shocks2" << endl << endl;
2006 
2007  BeamDefaults* prev_defaults = nullptr;
2008  for (size_t i = 0; i < module->shocks2.size(); i++)
2009  {
2010  Shock2& shock2 = module->shocks2[i];
2011  if (prev_defaults != shock2.beam_defaults.get())
2012  {
2013  ProcessBeamDefaults(shock2.beam_defaults.get());
2014  prev_defaults = shock2.beam_defaults.get();
2015  }
2016  this->ExportDocComment(module, Keyword::SHOCKS2, i);
2017  this->ProcessShock2(shock2);
2018  }
2019 
2020  // Empty line
2021  m_stream << endl;
2022 }
2023 
2025 {
2026  if (module->shocks3.empty())
2027  {
2028  return;
2029  }
2030 
2031  // Write shocks3 to file
2032  m_stream << "shocks3" << endl << endl;
2033 
2034  BeamDefaults* prev_defaults = nullptr;
2035  for (size_t i = 0; i < module->shocks3.size(); i++)
2036  {
2037  Shock3& shock3 = module->shocks3[i];
2038  if (prev_defaults != shock3.beam_defaults.get())
2039  {
2040  ProcessBeamDefaults(shock3.beam_defaults.get());
2041  prev_defaults = shock3.beam_defaults.get();
2042  }
2043  this->ExportDocComment(module, Keyword::SHOCKS3, i);
2044  this->ProcessShock3(shock3);
2045  }
2046 
2047  // Empty line
2048  m_stream << endl;
2049 }
2050 
2051 
2053 {
2054  if (module->hydros.empty())
2055  {
2056  return;
2057  }
2058 
2059  // Write hydros to file
2060  m_stream << "hydros" << endl << endl;
2061 
2062  BeamDefaults* prev_defaults = nullptr;
2063  for (size_t i = 0; i < module->hydros.size(); i++)
2064  {
2065  Hydro& hydro = module->hydros[i];
2066  if (prev_defaults != hydro.beam_defaults.get())
2067  {
2068  ProcessBeamDefaults(hydro.beam_defaults.get());
2069  prev_defaults = hydro.beam_defaults.get();
2070  }
2071  this->ExportDocComment(module, Keyword::HYDROS, i);
2072  this->ProcessHydro(hydro);
2073  }
2074 
2075  // Empty line
2076  m_stream << endl;
2077 }
2078 
2080 {
2081  if (module->commands2.empty())
2082  {
2083  return;
2084  }
2085 
2086  // Write commands to file
2087  m_stream << "commands" << endl << endl;
2088 
2089  BeamDefaults* prev_defaults = nullptr;
2090  for (size_t i = 0; i < module->commands2.size(); i++)
2091  {
2092  Command2& command = module->commands2[i];
2093  if (prev_defaults != command.beam_defaults.get())
2094  {
2095  ProcessBeamDefaults(command.beam_defaults.get());
2096  prev_defaults = command.beam_defaults.get();
2097  }
2098  this->ExportDocComment(module, Keyword::COMMANDS2, i);
2099  this->ProcessCommand2(command);
2100  }
2101 
2102  // Empty line
2103  m_stream << endl;
2104 }
2105 
2106 
2108 {
2110  << std::setw(m_node_id_width) << def.nodes[0].Str() << ", "
2111  << std::setw(m_node_id_width) << def.nodes[1].Str() << ", ";
2112 
2113  m_stream << std::setw(m_float_width) << def.shorten_rate << ", ";
2114  m_stream << std::setw(m_float_width) << def.lengthen_rate << ", ";
2115  m_stream << std::setw(m_float_width) << def.max_contraction << ", "; // So-called 'shortbound'
2116  m_stream << std::setw(m_float_width) << def.max_extension << ", "; // So-called 'longbound'
2117  m_stream << std::setw(m_command_key_width) << def.contract_key << ", ";
2118  m_stream << std::setw(m_command_key_width) << def.extend_key << ", ";
2119 
2120  // Options
2121  bool dummy = true;
2122  if (def.option_c_auto_center) { m_stream << "c"; dummy = false; }
2123  if (def.option_f_not_faster) { m_stream << "f"; dummy = false; }
2124  if (def.option_i_invisible) { m_stream << "i"; dummy = false; }
2125  if (def.option_o_1press_center) { m_stream << "o"; dummy = false; }
2126  if (def.option_p_1press) { m_stream << "p"; dummy = false; }
2127  if (def.option_r_rope) { m_stream << "r"; dummy = false; }
2128  if (dummy) { m_stream << "n"; } // Placeholder, does nothing
2129 
2130  m_stream << ", ";
2131 
2132  // Description
2133  m_stream << (def.description.length() > 0 ? def.description : "_");
2134 
2135  // Inertia
2136  if (def.inertia.start_function != "" && def.inertia.stop_function != "")
2137  {
2138  m_stream << ", ";
2139  m_stream << std::setw(m_float_width) << def.inertia.start_delay_factor << ", ";
2140  m_stream << std::setw(m_float_width) << def.inertia.stop_delay_factor << ", ";
2141  m_stream << std::setw(m_inertia_function_width) << def.inertia.start_function << ", ";
2142  m_stream << std::setw(m_inertia_function_width) << def.inertia.stop_function << ", ";
2143  m_stream << std::setw(m_float_width) << def.affect_engine << ", ";
2144  m_stream << std::setw(m_bool_width) << (def.needs_engine ? "true" : "false");
2145  }
2146  m_stream << endl;
2147 }
2148 
2150 {
2152  << std::setw(m_node_id_width) << def.nodes[0].Str() << ", "
2153  << std::setw(m_node_id_width) << def.nodes[1].Str() << ", ";
2154 
2155  m_stream << std::setw(m_float_width) << def.lenghtening_factor << ", ";
2156 
2157  // Options
2170  if (def.options == 0) m_stream << (char)HydroOption::n_INPUT_NORMAL;
2171 
2172  // Inertia
2173  Inertia & inertia = def.inertia;
2174  if (inertia.start_delay_factor != 0 && inertia.stop_delay_factor != 0)
2175  {
2176  m_stream << ", ";
2177  m_stream << std::setw(m_float_width) << inertia.start_delay_factor << ", ";
2178  m_stream << std::setw(m_float_width) << inertia.stop_delay_factor;
2179  if (!inertia.start_function.empty())
2180  {
2181  m_stream << ", " << std::setw(m_inertia_function_width) << inertia.start_function;
2182  if (!inertia.stop_function.empty())
2183  {
2184  m_stream << ", " << std::setw(m_inertia_function_width) << inertia.stop_function;
2185  }
2186  }
2187  }
2188  m_stream << endl;
2189 }
2190 
2192 {
2194  << std::setw(m_node_id_width) << def.nodes[0].Str() << ", "
2195  << std::setw(m_node_id_width) << def.nodes[1].Str() << ", ";
2196  m_stream << std::setw(m_float_width) << def.spring_rate << ", ";
2197  m_stream << std::setw(m_float_width) << def.damping << ", ";
2198  m_stream << std::setw(m_float_width) << def.short_bound << ", ";
2199  m_stream << std::setw(m_float_width) << def.long_bound << ", ";
2200  m_stream << std::setw(m_float_width) << def.precompression << ", ";
2201 
2202  // Options
2203  if (def.options == 0)
2204  {
2205  m_stream << "n"; // Placeholder
2206  }
2207  else
2208  {
2210  {
2211  m_stream << "i";
2212  }
2214  {
2215  m_stream << "m";
2216  }
2218  {
2219  m_stream << "L";
2220  }
2222  {
2223  m_stream << "R";
2224  }
2225  }
2226 
2227  // Empty line
2228  m_stream << endl;
2229 }
2230 
2232 {
2234  << std::setw(m_node_id_width) << def.nodes[0].Str() << ", "
2235  << std::setw(m_node_id_width) << def.nodes[1].Str() << ", ";
2236 
2237  m_stream << std::setw(m_float_width) << def.spring_in << ", ";
2238  m_stream << std::setw(m_float_width) << def.damp_in << ", ";
2239  m_stream << std::setw(m_float_width) << def.progress_factor_spring_in << ", ";
2240  m_stream << std::setw(m_float_width) << def.progress_factor_damp_in << ", ";
2241 
2242  m_stream << std::setw(m_float_width) << def.spring_out << ", ";
2243  m_stream << std::setw(m_float_width) << def.damp_out << ", ";
2244  m_stream << std::setw(m_float_width) << def.progress_factor_spring_out << ", ";
2245  m_stream << std::setw(m_float_width) << def.progress_factor_damp_out << ", ";
2246 
2247  m_stream << std::setw(m_float_width) << def.short_bound << ", ";
2248  m_stream << std::setw(m_float_width) << def.long_bound << ", ";
2249  m_stream << std::setw(m_float_width) << def.precompression << ", ";
2250 
2251  // Options
2252  if (def.options == 0)
2253  {
2254  m_stream << "n"; // Placeholder
2255  }
2256  else
2257  {
2259  {
2260  m_stream << "i";
2261  }
2263  {
2264  m_stream << "m";
2265  }
2267  {
2268  m_stream << "M";
2269  }
2271  {
2272  m_stream << "s";
2273  }
2274  }
2275 
2276  // Empty line
2277  m_stream << endl;
2278 }
2279 
2281 {
2283  << std::setw(m_node_id_width) << def.nodes[0].Str() << ", "
2284  << std::setw(m_node_id_width) << def.nodes[1].Str() << ", ";
2285 
2286  m_stream << std::setw(m_float_width) << def.spring_in << ", ";
2287  m_stream << std::setw(m_float_width) << def.damp_in << ", ";
2288  m_stream << std::setw(m_float_width) << def.damp_in_slow << ", ";
2289  m_stream << std::setw(m_float_width) << def.split_vel_in << ", ";
2290  m_stream << std::setw(m_float_width) << def.damp_in_fast << ", ";
2291 
2292  m_stream << std::setw(m_float_width) << def.spring_out << ", ";
2293  m_stream << std::setw(m_float_width) << def.damp_out << ", ";
2294  m_stream << std::setw(m_float_width) << def.damp_out_slow << ", ";
2295  m_stream << std::setw(m_float_width) << def.split_vel_out << ", ";
2296  m_stream << std::setw(m_float_width) << def.damp_out_fast << ", ";
2297 
2298  m_stream << std::setw(m_float_width) << def.short_bound << ", ";
2299  m_stream << std::setw(m_float_width) << def.long_bound << ", ";
2300  m_stream << std::setw(m_float_width) << def.precompression << ", ";
2301 
2302  // Options
2303  if (def.options != 0)
2304  {
2305  m_stream << "n"; // Placeholder
2306  }
2307  else
2308  {
2310  {
2311  m_stream << "i";
2312  }
2314  {
2315  m_stream << "m";
2316  }
2318  {
2319  m_stream << "M";
2320  }
2321  }
2322 
2323  // Empty line
2324  m_stream << endl;
2325 }
2326 
2328 {
2329  if (beam_defaults != nullptr)
2330  {
2331  m_stream << fmt::format("{}set_beam_defaults {}, {}, {}, {}, {}, {}, {}\n",
2333  (beam_defaults->springiness == DEFAULT_SPRING) ? -1.f : beam_defaults->springiness,
2334  (beam_defaults->damping_constant == DEFAULT_DAMP) ? -1.f : beam_defaults->damping_constant,
2335  (beam_defaults->deformation_threshold == BEAM_DEFORM) ? -1.f : beam_defaults->deformation_threshold,
2336  (beam_defaults->breaking_threshold == BEAM_BREAK) ? -1.f : beam_defaults->breaking_threshold,
2337  beam_defaults->visual_beam_diameter,
2338  beam_defaults->beam_material_name,
2339  beam_defaults->plastic_deform_coef);
2340  }
2341  else
2342  {
2343  m_stream << fmt::format("{}set_beam_defaults {}, {}, {}, {}, {}, {}, {}\n",
2344  m_setdefaults_indentstr, -1, -1, -1, -1, -1, " ", -1);
2345  }
2346 }
2347 
2349 {
2351  << std::setw(m_node_id_width) << beam.nodes[0].Str() << ", "
2352  << std::setw(m_node_id_width) << beam.nodes[1].Str() << ", ";
2353 
2354  // Options
2355  if (beam.options == 0u)
2356  {
2357  m_stream << "n"; // Placeholder
2358  }
2359  else
2360  {
2362  {
2363  m_stream << "i";
2364  }
2366  {
2367  m_stream << "r";
2368  }
2370  {
2371  m_stream << "s";
2372  }
2373  }
2374 
2375  if (beam._has_extension_break_limit)
2376  {
2377  m_stream << ", " << beam.extension_break_limit;
2378  }
2379 
2380  m_stream << endl;
2381 }
2382 
2384 {
2385  if (module->nodes.empty())
2386  {
2387  return;
2388  }
2389 
2390  // Numbered nodes
2391  m_stream << "nodes" << endl << endl;
2392 
2393  size_t num_named = 0;
2394  NodeDefaults* prev_preset = nullptr;
2395  DefaultMinimass* prev_dminimass = nullptr;
2396  for (size_t i = 0; i < module->nodes.size(); i++)
2397  {
2398  Node& node = module->nodes[i];
2399  if (node.id.IsTypeNamed())
2400  {
2401  ++num_named;
2402  }
2403 
2404  NodeDefaults* preset = node.node_defaults.get();
2405  if (preset != prev_preset)
2406  {
2407  this->ProcessNodeDefaults(preset);
2408  prev_preset = preset;
2409  }
2410 
2411  DefaultMinimass* dminimass = node.default_minimass.get();
2412  if (dminimass != prev_dminimass)
2413  {
2414  this->ProcessDefaultMinimass(dminimass);
2415  prev_dminimass = dminimass;
2416  }
2417  this->ExportDocComment(module, Keyword::NODES, i);
2418  this->ProcessNode(node);
2419  }
2420 
2421  // Named nodes
2422  if (num_named > 0)
2423  {
2424  m_stream << endl << endl << "nodes2" << endl;
2425 
2426  for (size_t i = 0; i < module->nodes.size(); i++)
2427  {
2428  Node& node = module->nodes[i];
2429  if (!node.id.IsTypeNamed())
2430  {
2431  continue;
2432  }
2433 
2434  NodeDefaults* preset = node.node_defaults.get();
2435  if (preset != prev_preset)
2436  {
2437  this->ProcessNodeDefaults(preset);
2438  prev_preset = preset;
2439  }
2440 
2441  DefaultMinimass* dminimass = node.default_minimass.get();
2442  if (dminimass != prev_dminimass)
2443  {
2444  this->ProcessDefaultMinimass(dminimass);
2445  prev_dminimass = dminimass;
2446  }
2447 
2448  this->ExportDocComment(module, Keyword::NODES2, i);
2449  this->ProcessNode(node);
2450  }
2451  }
2452 
2453  // Empty line
2454  m_stream << endl;
2455 }
2456 
2458 {
2459  if (node_defaults != nullptr)
2460  {
2461  m_stream << fmt::format("{}set_node_defaults {}, {}, {}, {}, {}\n",
2463  node_defaults->load_weight,
2464  node_defaults->friction,
2465  node_defaults->volume,
2466  node_defaults->surface,
2467  NodeOptionsToStr(node_defaults->options));
2468  }
2469  else
2470  {
2471  m_stream << fmt::format("{}set_node_defaults {}, {}, {}, {}, {}\n",
2472  m_setdefaults_indentstr, -1, -1, -1, -1, 'n');
2473  }
2474 }
2475 
2477 {
2478  std::string retval;
2479 
2480  if (options & Node::OPTION_m_NO_MOUSE_GRAB ) { retval += (char)NodeOption::m_NO_MOUSE_GRAB ; }
2481  if (options & Node::OPTION_f_NO_SPARKS ) { retval += (char)NodeOption::f_NO_SPARKS ; }
2482  if (options & Node::OPTION_x_EXHAUST_POINT ) { retval += (char)NodeOption::x_EXHAUST_POINT ; }
2483  if (options & Node::OPTION_y_EXHAUST_DIRECTION ) { retval += (char)NodeOption::y_EXHAUST_DIRECTION ; }
2484  if (options & Node::OPTION_c_NO_GROUND_CONTACT ) { retval += (char)NodeOption::c_NO_GROUND_CONTACT ; }
2485  if (options & Node::OPTION_h_HOOK_POINT ) { retval += (char)NodeOption::h_HOOK_POINT ; }
2486  if (options & Node::OPTION_e_TERRAIN_EDIT_POINT) { retval += (char)NodeOption::e_TERRAIN_EDIT_POINT; }
2487  if (options & Node::OPTION_b_EXTRA_BUOYANCY ) { retval += (char)NodeOption::b_EXTRA_BUOYANCY ; }
2488  if (options & Node::OPTION_p_NO_PARTICLES ) { retval += (char)NodeOption::p_NO_PARTICLES ; }
2489  if (options & Node::OPTION_L_LOG ) { retval += (char)NodeOption::L_LOG ; }
2490  if (options & Node::OPTION_l_LOAD_WEIGHT ) { retval += (char)NodeOption::l_LOAD_WEIGHT ; }
2491 
2492  if (retval == "")
2493  retval += (char)RigDef::NodeOption::n_DUMMY;
2494 
2495  return retval;
2496 }
2497 
2499 {
2500  m_stream << fmt::format("{}set_default_minimass {}\n",
2502  (def != nullptr) ? def->min_mass_Kg : -1);
2503 }
2504 
2506 {
2507  m_stream << fmt::format("{}{}, {:>{}}, {:>{}}, {:>{}}, {}, {}\n",
2509  node.id.Str(),
2510  node.position.x, m_float_width,
2511  node.position.y, m_float_width,
2512  node.position.z, m_float_width,
2513  NodeOptionsToStr(node.options),
2514  (node._has_load_weight_override) ? fmt::format("{}", node.load_weight_override) : "");
2515 }
2516 
2518 {
2519  if (m_rig_def->enable_advanced_deformation)
2520  {
2521  m_stream << "enable_advanced_deformation" << endl << endl;
2522  }
2523  if (m_rig_def->hide_in_chooser)
2524  {
2525  m_stream << "hideInChooser" << endl << endl;
2526  }
2527  if (m_rig_def->slide_nodes_connect_instantly)
2528  {
2529  m_stream << "slidenode_connect_instantly" << endl << endl;
2530  }
2531  if (m_rig_def->lockgroup_default_nolock)
2532  {
2533  m_stream << "lockgroup_default_nolock" << endl << endl;
2534  }
2535  if (m_rig_def->rollon)
2536  {
2537  m_stream << "rollon" << endl << endl;
2538  }
2539  if (m_rig_def->rescuer)
2540  {
2541  m_stream << "rescuer" << endl << endl;
2542  }
2543  if (m_rig_def->disable_default_sounds)
2544  {
2545  m_stream << "disabledefaultsounds" << endl << endl;
2546  }
2547  if (m_rig_def->forward_commands)
2548  {
2549  m_stream << "forwardcommands" << endl << endl;
2550  }
2551  if (m_rig_def->import_commands)
2552  {
2553  m_stream << "importcommands" << endl << endl;
2554  }
2555 }
2556 
2558 {
2559  if (module->fileinfo.size() > 0)
2560  {
2561  Fileinfo& data = module->fileinfo[module->fileinfo.size() - 1];
2562 
2563  m_stream << "fileinfo ";
2564  m_stream << data.unique_id;
2565  m_stream << ", " << data.category_id;
2566  m_stream << ", " << data.file_version;
2567 
2568  m_stream << endl << endl;
2569  }
2570 }
2571 
2573 {
2574  if (! module->guid.empty())
2575  {
2576  m_stream << "guid " << module->guid[module->guid.size() - 1].guid << endl << endl;
2577  }
2578 }
2579 
2581 {
2582  if (module->description.size() != 0)
2583  {
2584  m_stream << "description";
2585  for (auto itor = module->description.begin(); itor != module->description.end(); ++itor)
2586  {
2587  std::string line = *itor;
2588  m_stream << endl << line;
2589  }
2590  m_stream << endl << "end_description" << endl << endl;
2591  }
2592 }
2593 
2595 {
2596  for (auto itor = module->author.begin(); itor != module->author.end(); ++itor)
2597  {
2598  Author & def = *itor;
2599  m_stream << "author " << def.type << " ";
2600  if (def._has_forum_account)
2601  {
2602  m_stream << def.forum_account_id << " ";
2603  }
2604  else
2605  {
2606  m_stream << "-1 ";
2607  }
2608  m_stream << def.name << " " << def.email << endl;
2609  }
2610  m_stream << endl;
2611 }
2612 
2614 {
2615  if (module->globals.size() == 0)
2616  {
2617  return;
2618  }
2619 
2620  m_stream << "globals\n\t"
2621  << module->globals[0].dry_mass << ", "
2622  << module->globals[0].cargo_mass;
2623  if (!module->globals[0].material_name.empty())
2624  {
2625  m_stream << ", " << module->globals[0].material_name;
2626  }
2627  m_stream << endl << endl;
2628 }
2629 
2631 {
2632  m_current_node_defaults = nullptr;
2633  m_current_beam_defaults = nullptr;
2634  m_current_default_minimass = nullptr;
2635 }
2636 
2637 void Serializer::UpdatePresets(BeamDefaults* beam_defaults, NodeDefaults* node_defaults, DefaultMinimass* default_minimass)
2638 {
2639  if (m_current_node_defaults != node_defaults)
2640  {
2641  m_current_node_defaults = node_defaults;
2642  this->ProcessNodeDefaults(node_defaults);
2643  }
2644 
2645  if (m_current_beam_defaults != beam_defaults)
2646  {
2647  m_current_beam_defaults = beam_defaults;
2648  this->ProcessBeamDefaults(beam_defaults);
2649  }
2650 
2651  if (m_current_default_minimass != default_minimass)
2652  {
2653  m_current_default_minimass = default_minimass;
2654  this->ProcessDefaultMinimass(default_minimass);
2655  }
2656 }
2657 
2659 {
2660  auto itor = std::find_if(module->_comments.begin(), module->_comments.end(),
2661  [keyword, vectorpos](const RigDef::DocComment& dc) { return dc.commented_keyword == keyword && dc.commented_datapos == (int)vectorpos; });
2662 
2663  if (itor != module->_comments.end())
2664  {
2665  m_stream << itor->comment_text;
2666  }
2667 }
2668 
ANIMATOR_ADD_LIMIT
#define ANIMATOR_ADD_LIMIT(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR, VALUE)
Definition: RigDef_Serializer.cpp:1369
RigDef::Serializer::ProcessDefaultMinimass
void ProcessDefaultMinimass(DefaultMinimass *default_minimass)
Definition: RigDef_Serializer.cpp:2498
RigDef::DefaultMinimass::min_mass_Kg
float min_mass_Kg
minimum node mass in Kg
Definition: RigDef_File.h:659
RigDef::Hydro::OPTION_u_INPUT_AILERON_ELEVATOR
static const BitMask_t OPTION_u_INPUT_AILERON_ELEVATOR
Definition: RigDef_File.h:860
RigDef::Keyword::ROPES
@ ROPES
RigDef::Animation::SOURCE_EVENT
static const BitMask64_t SOURCE_EVENT
Definition: RigDef_File.h:390
RigDef::NodeOption::p_NO_PARTICLES
@ p_NO_PARTICLES
RigDef::Command2::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:639
RigDef::Document::Module::globals
std::vector< Globals > globals
Definition: RigDef_File.h:1396
RigDef::InterAxle::options
DifferentialTypeVec options
Order matters!
Definition: RigDef_File.h:882
RigDef::Engine::shift_up_rpm
float shift_up_rpm
Definition: RigDef_File.h:670
RigDef::Keyword::ROPABLES
@ ROPABLES
RigDef::HydroOption::e_INPUT_ELEVATOR
@ e_INPUT_ELEVATOR
RigDef::Shock2::spring_out
float spring_out
spring value applied when shock extending
Definition: RigDef_File.h:1093
RigDef::Animation::SOURCE_ANGLE_OF_ATTACK
static const BitMask64_t SOURCE_ANGLE_OF_ATTACK
Definition: RigDef_File.h:364
RigDef::Trigger::OPTION_c_COMMAND_STYLE
static const BitMask_t OPTION_c_COMMAND_STYLE
Definition: RigDef_File.h:1253
ANIMATOR_ADD_AERIAL_FLAG
#define ANIMATOR_ADD_AERIAL_FLAG(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR)
Definition: RigDef_Serializer.cpp:1362
RigDef::Hydro::OPTION_e_INPUT_ELEVATOR
static const BitMask_t OPTION_e_INPUT_ELEVATOR
Definition: RigDef_File.h:859
RigDef::Serializer::ProcessWings
void ProcessWings(Document::Module *module)
Definition: RigDef_Serializer.cpp:337
RigDef::Shock3::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:1128
RigDef::Airbrake::texcoord_x1
float texcoord_x1
Definition: RigDef_File.h:334
RigDef::SlideNode::CONSTRAINT_ATTACH_FOREIGN
static const BitMask_t CONSTRAINT_ATTACH_FOREIGN
Definition: RigDef_File.h:1141
RigDef::SlideNode::constraint_flags
BitMask_t constraint_flags
Definition: RigDef_File.h:1147
RigDef::Animation::SOURCE_FLAP
static const BitMask64_t SOURCE_FLAP
Definition: RigDef_File.h:365
RigDef::Keyword::NODES
@ NODES
RigDef::Engoption::min_idle_mixture
float min_idle_mixture
Definition: RigDef_File.h:689
RigDef::Animation::SOURCE_VERTICAL_VELOCITY
static const BitMask64_t SOURCE_VERTICAL_VELOCITY
Definition: RigDef_File.h:360
RigDef::Wing::tex_coords
float tex_coords[8]
Definition: RigDef_File.h:1344
RigDef::DocComment
< Represents a comment (line starting with ';' or '//') that can be anywhere in the file.
Definition: RigDef_File.h:311
RigDef::Trigger::OPTION_A_INV_TRIGGER_BLOCKER
static const BitMask_t OPTION_A_INV_TRIGGER_BLOCKER
Definition: RigDef_File.h:1257
RigDef::MaterialFlareBinding::material_name
Ogre::String material_name
Definition: RigDef_File.h:915
RigDef::Shock3::damp_out_fast
float damp_out_fast
Damping value applied when shock is commpressing faster than split out velocity.
Definition: RigDef_File.h:1123
RigDef::Prop::DashboardSpecial::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:970
RigDef::Beam::extension_break_limit
float extension_break_limit
Definition: RigDef_File.h:499
RigDef::VideoCamera::left_node
Node::Ref left_node
Definition: RigDef_File.h:1301
RigDef::NodeOption::b_EXTRA_BUOYANCY
@ b_EXTRA_BUOYANCY
RigDef::Serializer::ProcessBrakes
void ProcessBrakes(Document::Module *module)
Definition: RigDef_Serializer.cpp:1629
RigDef::Turboprop2::blade_tip_nodes
Node::Ref blade_tip_nodes[4]
Definition: RigDef_File.h:1292
RigDef::Cab::OPTION_p_10xTOUGHER
static const BitMask_t OPTION_p_10xTOUGHER
Definition: RigDef_File.h:575
RigDef::Serializer::ProcessFileinfo
void ProcessFileinfo(Document::Module *module)
Definition: RigDef_Serializer.cpp:2557
RigDef::Serializer::ProcessBeamDefaults
void ProcessBeamDefaults(BeamDefaults *beam_defaults)
Definition: RigDef_Serializer.cpp:2327
RigDef::Keyword::SOUNDSOURCES
@ SOUNDSOURCES
RigDef::GuiSettings
Definition: RigDef_File.h:821
RigDef::SlideNode::tolerance
float tolerance
Definition: RigDef_File.h:1152
RigDef::Document::Module::screwprops
std::vector< Screwprop > screwprops
Definition: RigDef_File.h:1418
RigDef::Turboprop2::axis_node
Node::Ref axis_node
Definition: RigDef_File.h:1291
RigDef::Serializer::ProcessMeshWheels2
void ProcessMeshWheels2(Document::Module *module)
Definition: RigDef_Serializer.cpp:1875
RigDef::Rope::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:1018
RigDef::Serializer::ProcessFlexBodyWheels
void ProcessFlexBodyWheels(Document::Module *module)
Definition: RigDef_Serializer.cpp:1568
RigDef::Node::OPTION_x_EXHAUST_POINT
static const BitMask_t OPTION_x_EXHAUST_POINT
Definition: RigDef_Node.h:148
RigDef::ExtCamera::node
Node::Ref node
Definition: RigDef_File.h:723
RigDef::Serializer::ProcessNodes
void ProcessNodes(Document::Module *)
Definition: RigDef_Serializer.cpp:2383
RigDef::InterAxle::a2
int a2
Definition: RigDef_File.h:881
RigDef::Serializer::m_current_node_defaults
NodeDefaults * m_current_node_defaults
Definition: RigDef_Serializer.h:177
RigDef::Node::Ref
Legacy parser resolved references on-the-fly and the condition to check named nodes was "are there an...
Definition: RigDef_Node.h:77
RigDef::Hydro::inertia
Inertia inertia
Definition: RigDef_File.h:872
RigDef::Command2::option_f_not_faster
bool option_f_not_faster
Definition: RigDef_File.h:646
RigDef::Prop
Definition: RigDef_File.h:959
RigDef::Serializer::ProcessRotators2
void ProcessRotators2(Document::Module *module)
Definition: RigDef_Serializer.cpp:1505
RigDef::Keyword::PISTONPROPS
@ PISTONPROPS
RigDef::Serializer::ProcessVideocamera
void ProcessVideocamera(Document::Module *module)
Definition: RigDef_Serializer.cpp:445
RigDef::Keyword::VIDEOCAMERA
@ VIDEOCAMERA
RigDef::NodeDefaults::options
unsigned int options
Bit flags.
Definition: RigDef_File.h:938
RigDef::Tie::group
int group
Definition: RigDef_File.h:1208
RigDef::TractionControl::fade_speed
float fade_speed
Definition: RigDef_File.h:1234
RigDef::Keyword::ANIMATORS
@ ANIMATORS
RigDef::Document::Module::hooks
std::vector< Hook > hooks
Definition: RigDef_File.h:1400
RigDef::Prop::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:990
RigDef::Engine::neutral_gear_ratio
float neutral_gear_ratio
Definition: RigDef_File.h:674
RigDef::Brakes::default_braking_force
float default_braking_force
Definition: RigDef_File.h:567
RigDef::Command2::option_o_1press_center
bool option_o_1press_center
Definition: RigDef_File.h:648
RigDef::Document::Module::fusedrag
std::vector< Fusedrag > fusedrag
Definition: RigDef_File.h:1395
RigDef::Document::Module::brakes
std::vector< Brakes > brakes
Definition: RigDef_File.h:1372
RigDef::VideoCamera::min_clip_distance
float min_clip_distance
Definition: RigDef_File.h:1310
RigDef::Animation::lower_limit
float lower_limit
Definition: RigDef_File.h:410
RigDef::Wing::control_surface
WingControlSurface control_surface
Definition: RigDef_File.h:1345
RigDef::Rotator::needs_engine
bool needs_engine
Definition: RigDef_File.h:1033
RigDef::Shock2::OPTION_s_SOFT_BUMP_BOUNDS
static const BitMask_t OPTION_s_SOFT_BUMP_BOUNDS
Definition: RigDef_File.h:1084
RigDef::ManagedMaterial::diffuse_map
Ogre::String diffuse_map
Definition: RigDef_File.h:905
RigDef::Hook::option_hookgroup
int option_hookgroup
Definition: RigDef_File.h:840
RigDef::TractionControl::attr_no_dashboard
bool attr_no_dashboard
Definition: RigDef_File.h:1237
RigDef::Serializer::m_inertia_function_width
int m_inertia_function_width
Definition: RigDef_Serializer.h:172
RigDef::Serializer::ProcessTurboprops
void ProcessTurboprops(Document::Module *module)
Definition: RigDef_Serializer.cpp:276
RigDef::Serializer::ProcessGuiSettings
void ProcessGuiSettings(Document::Module *module)
Definition: RigDef_Serializer.cpp:499
RigDef::Serializer::ProcessShocks3
void ProcessShocks3(Document::Module *)
Definition: RigDef_Serializer.cpp:2024
RigDef::Inertia::start_function
Ogre::String start_function
Definition: RigDef_File.h:307
RigDef::VideoCamera::texture_width
unsigned int texture_width
Definition: RigDef_File.h:1308
RigDef::Flare2::type
RoR::FlareType type
Definition: RigDef_File.h:744
RigDef::Animator::long_limit
float long_limit
Definition: RigDef_File.h:457
RigDef::Keyword::TURBOPROPS
@ TURBOPROPS
RigDef::Serializer::ProcessTurbojets
void ProcessTurbojets(Document::Module *module)
Definition: RigDef_Serializer.cpp:202
RigDef_Serializer.h
RigDef::Author
Definition: RigDef_File.h:476
RigDef::Engoption::post_shift_time
float post_shift_time
Seconds.
Definition: RigDef_File.h:685
RigDef::Shock::OPTION_R_ACTIVE_RIGHT
static const BitMask_t OPTION_R_ACTIVE_RIGHT
Definition: RigDef_File.h:1065
RigDef::Node::Ref::Str
const std::string & Str() const
Definition: RigDef_Node.h:94
RigDef::Shock::long_bound
float long_bound
Maximum extension. The longest length a shock can be, as a proportion of its original length....
Definition: RigDef_File.h:1072
RigDef::Document::Module::_comments
std::vector< DocComment > _comments
Definition: RigDef_File.h:1449
RigDef::NodeDefaults::surface
float surface
Definition: RigDef_File.h:937
RigDef::SoundSource2::mode
int mode
A special constant or cinecam index.
Definition: RigDef_File.h:1169
RigDef::Airbrake::texcoord_y1
float texcoord_y1
Definition: RigDef_File.h:336
RigDef::Engoption::shift_time
float shift_time
Seconds.
Definition: RigDef_File.h:683
RigDef::Animation
Definition: RigDef_File.h:341
BEAM_DEFORM
static const float BEAM_DEFORM
Definition: SimConstants.h:61
RigDef::Keyword::SHOCKS
@ SHOCKS
RigDef::AntiLockBrakes::attr_no_dashboard
bool attr_no_dashboard
Definition: RigDef_File.h:472
RigDef::Document::Module::wheels
std::vector< Wheel > wheels
Definition: RigDef_File.h:1440
RigDef::Command2::max_extension
float max_extension
Definition: RigDef_File.h:631
RigDef::Animator::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:453
RigDef::HydroOption::y_INPUT_InvAILERON_RUDDER
@ y_INPUT_InvAILERON_RUDDER
RigDef::Engine::gear_ratios
std::vector< float > gear_ratios
Definition: RigDef_File.h:675
RigDef::Tie::auto_shorten_rate
float auto_shorten_rate
Definition: RigDef_File.h:1201
RigDef::MaterialFlareBinding::flare_number
unsigned int flare_number
Definition: RigDef_File.h:914
RigDef::Tie::min_length
float min_length
Definition: RigDef_File.h:1202
RigDef::Turboprop2::airfoil
Ogre::String airfoil
Definition: RigDef_File.h:1294
RigDef::Prop::DashboardSpecial::mesh_name
Ogre::String mesh_name
Definition: RigDef_File.h:973
RigDef::SkeletonSettings
Definition: RigDef_File.h:1132
RigDef::Engine::global_gear_ratio
float global_gear_ratio
Definition: RigDef_File.h:672
RigDef::Document::Module::pistonprops
std::vector< Pistonprop > pistonprops
Definition: RigDef_File.h:1411
RigDef::Keyword::NODES2
@ NODES2
RigDef::Shock3::split_vel_out
float split_vel_out
Split velocity in (m/s) - threshold for slow / fast damping during extension.
Definition: RigDef_File.h:1122
RigDef::RailGroup
Definition: RigDef_File.h:1000
RigDef::TriggerOption::s_CMD_NUM_SWITCH
@ s_CMD_NUM_SWITCH
switch that exchanges cmdshort/cmdshort for all triggers with the same commandnumbers,...
RigDef::Document::Module::lockgroups
std::vector< Lockgroup > lockgroups
Definition: RigDef_File.h:1403
RigDef::HydroOption::a_INPUT_AILERON
@ a_INPUT_AILERON
RigDef::VideoCamera::camera_mode
int camera_mode
Definition: RigDef_File.h:1313
RigDef::Animation::MODE_BOUNCE
static const BitMask_t MODE_BOUNCE
Definition: RigDef_File.h:406
RigDef::Hook::flag_auto_lock
bool flag_auto_lock
Definition: RigDef_File.h:845
RigDef::Document::Module::shocks2
std::vector< Shock2 > shocks2
Definition: RigDef_File.h:1421
RigDef::Animation::SOURCE_TACHO
static const BitMask64_t SOURCE_TACHO
Definition: RigDef_File.h:373
RigDef::Document::Module::commands2
std::vector< Command2 > commands2
Definition: RigDef_File.h:1377
RigDef::Fusedrag::approximate_width
float approximate_width
Definition: RigDef_File.h:804
RigDef::Serializer::ProcessCommands2
void ProcessCommands2(Document::Module *)
Definition: RigDef_Serializer.cpp:2079
RigDef::Prop::rotation
Ogre::Vector3 rotation
Definition: RigDef_File.h:991
RigDef::Fusedrag::autocalc
bool autocalc
Definition: RigDef_File.h:801
RigDef::NodeDefaults::volume
float volume
Definition: RigDef_File.h:936
RigDef::Keyword::FLEXBODYWHEELS
@ FLEXBODYWHEELS
RigDef::ManagedMaterial::damaged_diffuse_map
Ogre::String damaged_diffuse_map
Definition: RigDef_File.h:906
RigDef::Engoption::type
EngineType type
Definition: RigDef_File.h:681
RigDef::Serializer::ProcessCollisionBoxes
void ProcessCollisionBoxes(Document::Module *module)
Definition: RigDef_Serializer.cpp:886
RigDef::Rotator::rate
float rate
Definition: RigDef_File.h:1027
RigDef::Document::Module::wings
std::vector< Wing > wings
Definition: RigDef_File.h:1442
format
Truck file format(technical spec)
RigDef::BeamDefaults::deformation_threshold
float deformation_threshold
Definition: RigDef_File.h:555
RigDef::NodeOption::e_TERRAIN_EDIT_POINT
@ e_TERRAIN_EDIT_POINT
RigDef::Keyword::HOOKS
@ HOOKS
RigDef::Particle::particle_system_name
Ogre::String particle_system_name
Definition: RigDef_File.h:945
RigDef::Hydro
Definition: RigDef_File.h:851
RigDef::Shock::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:1075
RigDef::SlideNode::CONSTRAINT_ATTACH_SELF
static const BitMask_t CONSTRAINT_ATTACH_SELF
Definition: RigDef_File.h:1142
RigDef::CollisionBox
Definition: RigDef_File.h:615
RigDef::SlideNode::break_force
float break_force
Definition: RigDef_File.h:1151
RigDef::Animation::SOURCE_PARKING
static const BitMask64_t SOURCE_PARKING
Definition: RigDef_File.h:375
RigDef::Command2::shorten_rate
float shorten_rate
Definition: RigDef_File.h:628
RigDef::Ropable
Definition: RigDef_File.h:1006
RigDef::Trigger::longbound_trigger_action
int longbound_trigger_action
Definition: RigDef_File.h:1272
RigDef::Serializer::m_current_default_minimass
DefaultMinimass * m_current_default_minimass
Definition: RigDef_Serializer.h:178
RigDef::SlideNode::attachment_rate
float attachment_rate
Definition: RigDef_File.h:1153
RigDef::Keyword::AIRBRAKES
@ AIRBRAKES
RigDef::BaseMeshWheel::side
RoR::WheelSide side
Definition: RigDef_File.h:281
RigDef::SoundSource::node
Node::Ref node
Definition: RigDef_File.h:1160
RigDef::Animation::SOURCE_BOAT_RUDDER
static const BitMask64_t SOURCE_BOAT_RUDDER
Definition: RigDef_File.h:383
RigDef::Wing::chord_point
float chord_point
Definition: RigDef_File.h:1346
RigDef::Shock2::spring_in
float spring_in
Spring value applied when the shock is compressing.
Definition: RigDef_File.h:1089
RigDef::BaseWheel::width
float width
Definition: RigDef_File.h:267
RigDef::Flexbody::rotation
Ogre::Vector3 rotation
Definition: RigDef_File.h:779
RigDef::Airbrake
Definition: RigDef_File.h:322
RigDef::Keyword::INTERAXLES
@ INTERAXLES
RigDef::Document::Module::cruisecontrol
std::vector< CruiseControl > cruisecontrol
Definition: RigDef_File.h:1378
RigDef::NodeOption::x_EXHAUST_POINT
@ x_EXHAUST_POINT
RigDef::Keyword::PARTICLES
@ PARTICLES
RigDef::Document::Module::ropes
std::vector< Rope > ropes
Definition: RigDef_File.h:1415
RigDef::Flexbody::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:778
RigDef::Tie::options
BitMask_t options
Definition: RigDef_File.h:1204
RigDef::Flare2
Definition: RigDef_File.h:738
RigDef::Shock::OPTION_m_METRIC
static const BitMask_t OPTION_m_METRIC
Definition: RigDef_File.h:1066
RigDef::Serializer::ProcessRopables
void ProcessRopables(Document::Module *module)
Definition: RigDef_Serializer.cpp:1071
RigDef::Shock::OPTION_L_ACTIVE_LEFT
static const BitMask_t OPTION_L_ACTIVE_LEFT
Definition: RigDef_File.h:1064
RigDef::Serializer::ProcessHydro
void ProcessHydro(Hydro &def)
Definition: RigDef_Serializer.cpp:2149
RigDef::SlideNode::rail_node_ranges
std::vector< Node::Range > rail_node_ranges
Definition: RigDef_File.h:1146
RigDef::GuiSettings::key
std::string key
Definition: RigDef_File.h:823
RigDef::Animation::SOURCE_PITCH
static const BitMask64_t SOURCE_PITCH
Definition: RigDef_File.h:368
RigDef::Document::Module::help
std::vector< Help > help
Definition: RigDef_File.h:1399
RigDef::Document::Module::airbrakes
std::vector< Airbrake > airbrakes
Definition: RigDef_File.h:1365
RigDef::Keyword::SCREWPROPS
@ SCREWPROPS
RigDef::Trigger
Definition: RigDef_File.h:1250
RigDef::CollisionBox::nodes
std::vector< Node::Ref > nodes
Definition: RigDef_File.h:617
RigDef::Shock3::precompression
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
Definition: RigDef_File.h:1126
RigDef::Document::Module::nodes
std::vector< Node > nodes
Definition: RigDef_File.h:1409
RigDef::Airbrake::lift_coefficient
float lift_coefficient
Definition: RigDef_File.h:338
RigDef::BeamDefaults::springiness
float springiness
Definition: RigDef_File.h:553
RigDef::Hydro::OPTION_n_INPUT_NORMAL
static const BitMask_t OPTION_n_INPUT_NORMAL
Definition: RigDef_File.h:867
RigDef::Command2::description
Ogre::String description
Definition: RigDef_File.h:634
RigDef::Serializer::ExportBaseMeshWheel
void ExportBaseMeshWheel(BaseMeshWheel &def)
Definition: RigDef_Serializer.cpp:1834
RigDef::NodeOption::L_LOG
@ L_LOG
RigDef::Flare2::node_axis_y
Node::Ref node_axis_y
Definition: RigDef_File.h:742
RigDef::Animation::SOURCE_ALTIMETER_10K
static const BitMask64_t SOURCE_ALTIMETER_10K
Definition: RigDef_File.h:362
RigDef::Trigger::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:1264
RigDef::Axle::wheels
Node::Ref wheels[2][2]
Definition: RigDef_File.h:487
RigDef::Rotator::spin_right_key
unsigned int spin_right_key
Definition: RigDef_File.h:1029
RigDef::BeamDefaults
Definition: RigDef_File.h:520
RigDef::Flare2::blink_delay_milis
int blink_delay_milis
Definition: RigDef_File.h:747
RigDef::Document::Module::slidenodes
std::vector< SlideNode > slidenodes
Definition: RigDef_File.h:1425
RigDef::BaseWheel::propulsion
RoR::WheelPropulsion propulsion
Definition: RigDef_File.h:272
RigDef::Document::Module
Definition: RigDef_File.h:1358
RigDef::Node::OPTION_p_NO_PARTICLES
static const BitMask_t OPTION_p_NO_PARTICLES
Definition: RigDef_Node.h:154
RigDef::Cab::OPTION_u_INVULNERABLE
static const BitMask_t OPTION_u_INVULNERABLE
Definition: RigDef_File.h:576
RigDef::Flexbody::animations
std::list< Animation > animations
Definition: RigDef_File.h:781
RigDef::TriggerOption::c_COMMAND_STYLE
@ c_COMMAND_STYLE
trigger is set with commandstyle boundaries instead of shocksytle
RigDef::Serializer::NodeOptionsToStr
std::string NodeOptionsToStr(BitMask_t options)
Definition: RigDef_Serializer.cpp:2476
RigDef::VideoCamera::rotation
Ogre::Vector3 rotation
Definition: RigDef_File.h:1306
RigDef::Serializer::ProcessShock2
void ProcessShock2(Shock2 &def)
Definition: RigDef_Serializer.cpp:2231
RigDef::Airbrake::y_axis_node
Node::Ref y_axis_node
Definition: RigDef_File.h:328
RigDef::Turboprop2::turbine_power_kW
float turbine_power_kW
Definition: RigDef_File.h:1293
RigDef::SlideNode::_spring_rate_set
bool _spring_rate_set
Definition: RigDef_File.h:1150
RigDef::TriggerOption::B_TRIGGER_BLOCKER
@ B_TRIGGER_BLOCKER
Blocker that enable/disable other triggers.
RigDef::Particle
Definition: RigDef_File.h:941
RigDef::Serializer::ProcessAuthors
void ProcessAuthors(Document::Module *module)
Definition: RigDef_Serializer.cpp:2594
RigDef::Engine::shift_down_rpm
float shift_down_rpm
Definition: RigDef_File.h:669
RigDef::CabOption::b_BUOYANT
@ b_BUOYANT
RigDef::Animation::MODE_EVENT_LOCK
static const BitMask_t MODE_EVENT_LOCK
Definition: RigDef_File.h:407
RigDef::NodeDefaults::friction
float friction
Definition: RigDef_File.h:935
RigDef::Serializer::ProcessShock
void ProcessShock(Shock &def)
Definition: RigDef_Serializer.cpp:2191
RigDef::CabOption::D_CONTACT_BUOYANT
@ D_CONTACT_BUOYANT
RigDef::Document::Module::axles
std::vector< Axle > axles
Definition: RigDef_File.h:1370
RigDef::Engoption::braking_torque
float braking_torque
Definition: RigDef_File.h:690
RigDef::SkeletonSettings::beam_thickness_meters
float beam_thickness_meters
Definition: RigDef_File.h:1135
RigDef::Flexbody::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:775
RigDef::BeamDefaults::breaking_threshold
float breaking_threshold
Definition: RigDef_File.h:556
RigDef::Document::Module::author
std::vector< Author > author
Definition: RigDef_File.h:1369
RigDef::Animator::short_limit
float short_limit
Definition: RigDef_File.h:456
RigDef::Animation::SOURCE_SHIFTERLIN
static const BitMask64_t SOURCE_SHIFTERLIN
Definition: RigDef_File.h:379
RigDef::SlideNode::_tolerance_set
bool _tolerance_set
Definition: RigDef_File.h:1152
RigDef::TriggerOption::t_CONTINUOUS
@ t_CONTINUOUS
this trigger sends values between 0 and 1
RigDef::Animation::SOURCE_AIR_RUDDER
static const BitMask64_t SOURCE_AIR_RUDDER
Definition: RigDef_File.h:388
RigDef::Shock2::long_bound
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1098
RigDef::Node::Ref::IsValidAnyState
bool IsValidAnyState() const
Definition: RigDef_Node.h:101
RigDef::Serializer::ProcessEngine
void ProcessEngine(Document::Module *module)
Definition: RigDef_Serializer.cpp:1660
RigDef::Node::OPTION_m_NO_MOUSE_GRAB
static const BitMask_t OPTION_m_NO_MOUSE_GRAB
Definition: RigDef_Node.h:146
RigDef::Rotator::axis_nodes
Node::Ref axis_nodes[2]
Definition: RigDef_File.h:1024
RigDef::Trigger::options
BitMask_t options
Definition: RigDef_File.h:1267
RigDef::Animation::SOURCE_AIRSPEED
static const BitMask64_t SOURCE_AIRSPEED
Definition: RigDef_File.h:359
RigDef::NodeDefaults
Definition: RigDef_File.h:930
RigDef::Serializer::ProcessManagedMaterialsAndOptions
void ProcessManagedMaterialsAndOptions(Document::Module *module)
Definition: RigDef_Serializer.cpp:831
RigDef::Hook
Definition: RigDef_File.h:832
RigDef::Hydro::options
BitMask_t options
Definition: RigDef_File.h:871
RigDef::Serializer::ProcessFusedrag
void ProcessFusedrag(Document::Module *module)
Definition: RigDef_Serializer.cpp:253
RigDef::HydroOption::u_INPUT_AILERON_ELEVATOR
@ u_INPUT_AILERON_ELEVATOR
RigDef::Document::Module::submeshes
std::vector< Submesh > submeshes
Definition: RigDef_File.h:1430
RigDef::AntiLockBrakes
Definition: RigDef_File.h:464
RigDef::Trigger::OPTION_B_TRIGGER_BLOCKER
static const BitMask_t OPTION_B_TRIGGER_BLOCKER
Definition: RigDef_File.h:1256
RigDef::InterAxle::a1
int a1
Definition: RigDef_File.h:880
GUIManager.h
RigDef::Document::Module::guisettings
std::vector< GuiSettings > guisettings
Definition: RigDef_File.h:1398
RigDef::Animation::SOURCE_ELEVATOR
static const BitMask64_t SOURCE_ELEVATOR
Definition: RigDef_File.h:387
RigDef::Ropable::has_multilock
bool has_multilock
Definition: RigDef_File.h:1010
RigDef::Keyword::AXLES
@ AXLES
Actor.h
RigDef::Ropable::node
Node::Ref node
Definition: RigDef_File.h:1008
RigDef::TractionControl::pulse_per_sec
float pulse_per_sec
Definition: RigDef_File.h:1235
RigDef::Command2::extend_key
RoR::CommandkeyID_t extend_key
Definition: RigDef_File.h:633
RigDef::Animation::SOURCE_ROLL
static const BitMask64_t SOURCE_ROLL
Definition: RigDef_File.h:367
RigDef::Shock3::damp_in
float damp_in
Damping value applied when the shock is compressing.
Definition: RigDef_File.h:1115
RigDef::Shock2::damp_out
float damp_out
damping value applied when shock extending
Definition: RigDef_File.h:1094
RigDef::TriggerOption::x_START_DISABLED
@ x_START_DISABLED
this trigger is disabled on startup, default is enabled
RigDef::Engoption::clutch_time
float clutch_time
Seconds.
Definition: RigDef_File.h:684
RigDef::Shock3::spring_out
float spring_out
Spring value applied when shock extending.
Definition: RigDef_File.h:1116
RigDef::Brakes
Definition: RigDef_File.h:565
RigDef::Command2
Definition: RigDef_File.h:625
RigDef::Tie::max_stress
float max_stress
Definition: RigDef_File.h:1205
RigDef::SlideNode::max_attach_dist
float max_attach_dist
Definition: RigDef_File.h:1155
RigDef::Animation::MODE_ROTATION_Y
static const BitMask_t MODE_ROTATION_Y
Definition: RigDef_File.h:399
RigDef::SoundSource2
Definition: RigDef_File.h:1164
BEAM_BREAK
static const float BEAM_BREAK
Definition: SimConstants.h:60
RigDef::TriggerOption::i_INVISIBLE
@ i_INVISIBLE
invisible
RigDef::Particle::emitter_node
Node::Ref emitter_node
Definition: RigDef_File.h:943
RigDef::Serializer::ProcessSlideNodes
void ProcessSlideNodes(Document::Module *module)
Definition: RigDef_Serializer.cpp:1199
RigDef::Author::name
Ogre::String name
Definition: RigDef_File.h:480
RigDef::Animation::SOURCE_AILERON
static const BitMask64_t SOURCE_AILERON
Definition: RigDef_File.h:386
RigDef::Hydro::OPTION_g_INPUT_ELEVATOR_RUDDER
static const BitMask_t OPTION_g_INPUT_ELEVATOR_RUDDER
Definition: RigDef_File.h:864
RigDef::Command2::option_r_rope
bool option_r_rope
Definition: RigDef_File.h:644
RigDef::Serializer::RigidityNodeToStr
std::string RigidityNodeToStr(Node::Ref node)
Definition: RigDef_Serializer.h:155
RigDef::Serializer::ProcessTriggers
void ProcessTriggers(Document::Module *module)
Definition: RigDef_Serializer.cpp:1315
RigDef::VideoCamera::camera_role
RoR::VideoCamRole camera_role
Definition: RigDef_File.h:1312
RigDef::BaseMeshWheel::rim_radius
float rim_radius
Definition: RigDef_File.h:284
RigDef::Node::position
Ogre::Vector3 position
Definition: RigDef_Node.h:159
RigDef::Keyword::RAILGROUPS
@ RAILGROUPS
RigDef::Fileinfo
Definition: RigDef_File.h:731
RigDef::Document::Module::meshwheels2
std::vector< MeshWheel2 > meshwheels2
Definition: RigDef_File.h:1407
RigDef::Serializer::WriteFlags
void WriteFlags()
Definition: RigDef_Serializer.cpp:2517
RigDef::CabOption::S_INVULNERABLE_BUOYANT
@ S_INVULNERABLE_BUOYANT
RigDef::Shock::short_bound
float short_bound
Maximum contraction. The shortest length the shock can be, as a proportion of its original length....
Definition: RigDef_File.h:1071
RigDef::Shock2::OPTION_m_METRIC
static const BitMask_t OPTION_m_METRIC
Definition: RigDef_File.h:1085
RigDef::Document::Module::set_skeleton_settings
std::vector< SkeletonSettings > set_skeleton_settings
Definition: RigDef_File.h:1424
RigDef::BeamDefaults::damping_constant
float damping_constant
Definition: RigDef_File.h:554
RigDef::BaseMeshWheel::spring
float spring
Definition: RigDef_File.h:286
RigDef::VideoCamera::alt_reference_node
Node::Ref alt_reference_node
Definition: RigDef_File.h:1303
RigDef::Shock::spring_rate
float spring_rate
The 'stiffness' of the shock. The higher the value, the less the shock will move for a given bump.
Definition: RigDef_File.h:1069
RigDef::Fileinfo::unique_id
Ogre::String unique_id
Definition: RigDef_File.h:733
RigDef::Engoption::max_idle_mixture
float max_idle_mixture
Definition: RigDef_File.h:688
RigDef::Keyword::WINGS
@ WINGS
RigDef::Document::Module::turbojets
std::vector< Turbojet > turbojets
Definition: RigDef_File.h:1436
RigDef::Serializer::ProcessEngoption
void ProcessEngoption(Document::Module *module)
Definition: RigDef_Serializer.cpp:1694
RigDef::Serializer::ProcessRopes
void ProcessRopes(Document::Module *module)
Definition: RigDef_Serializer.cpp:1136
RigDef::Command2::option_p_1press
bool option_p_1press
Definition: RigDef_File.h:647
RigDef::Document::Module::ties
std::vector< Tie > ties
Definition: RigDef_File.h:1431
RigDef::Command2::inertia
Inertia inertia
Definition: RigDef_File.h:635
RigDef::ManagedMaterial::type
ManagedMaterialType type
Definition: RigDef_File.h:903
RigDef::Animation::MODE_AUTO_ANIMATE
static const BitMask_t MODE_AUTO_ANIMATE
Definition: RigDef_File.h:404
RigDef::Node::OPTION_l_LOAD_WEIGHT
static const BitMask_t OPTION_l_LOAD_WEIGHT
Definition: RigDef_Node.h:156
RigDef::Serializer::m_stream
std::stringstream m_stream
Definition: RigDef_Serializer.h:165
RigDef::ManagedMaterial::options
ManagedMaterialsOptions options
Definition: RigDef_File.h:904
RigDef::ManagedMaterial::name
Ogre::String name
Definition: RigDef_File.h:902
RigDef::Prop::special
SpecialProp special
Definition: RigDef_File.h:995
RigDef::Serializer::m_float_width
int m_float_width
Definition: RigDef_Serializer.h:168
RigDef::ManagedMaterialType::FLEXMESH_STANDARD
@ FLEXMESH_STANDARD
RigDef::Serializer::ProcessCinecam
void ProcessCinecam(Document::Module *)
Definition: RigDef_Serializer.cpp:1909
RigDef::Keyword::SHOCKS3
@ SHOCKS3
RigDef::AntiLockBrakes::attr_no_toggle
bool attr_no_toggle
Definition: RigDef_File.h:473
RigDef::Flare2::material_name
Ogre::String material_name
Definition: RigDef_File.h:749
RigDef::BaseWheel::mass
float mass
Definition: RigDef_File.h:274
RigDef::NodeOption::y_EXHAUST_DIRECTION
@ y_EXHAUST_DIRECTION
RigDef::Document::Module::contacters
std::vector< Node::Ref > contacters
Definition: RigDef_File.h:1379
RigDef::Document::Module::cinecam
std::vector< Cinecam > cinecam
Definition: RigDef_File.h:1376
RigDef::Serializer::ProcessNodeDefaults
void ProcessNodeDefaults(NodeDefaults *node_defaults)
Definition: RigDef_Serializer.cpp:2457
RigDef::Node::_has_load_weight_override
bool _has_load_weight_override
Definition: RigDef_Node.h:162
RigDef::Document::Module::wheels2
std::vector< Wheel2 > wheels2
Definition: RigDef_File.h:1441
RigDef::Keyword::ROTATORS
@ ROTATORS
RigDef::Engoption
Definition: RigDef_File.h:678
RigDef::Shock2::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:1083
RigDef::Trigger::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:1252
RigDef::Beam::_has_extension_break_limit
bool _has_extension_break_limit
Definition: RigDef_File.h:500
RigDef::Animation::SOURCE_BOAT_THROTTLE
static const BitMask64_t SOURCE_BOAT_THROTTLE
Definition: RigDef_File.h:384
RigDef::CruiseControl::min_speed
float min_speed
Definition: RigDef_File.h:653
RigDef::Author::_has_forum_account
bool _has_forum_account
Definition: RigDef_File.h:482
RigDef::AntiLockBrakes::min_speed
unsigned int min_speed
Definition: RigDef_File.h:469
RigDef::BaseWheel::braking
RoR::WheelBraking braking
Definition: RigDef_File.h:271
RigDef::VideoCamera::texture_height
unsigned int texture_height
Definition: RigDef_File.h:1309
RigDef::SlideNode::spring_rate
float spring_rate
Definition: RigDef_File.h:1150
RigDef::Document::Module::transfercase
std::vector< TransferCase > transfercase
Definition: RigDef_File.h:1434
RigDef::Shock2
Definition: RigDef_File.h:1079
RigDef::Animation::SOURCE_DIFFLOCK
static const BitMask64_t SOURCE_DIFFLOCK
Definition: RigDef_File.h:382
RigDef::Animation::SOURCE_AIR_BRAKE
static const BitMask64_t SOURCE_AIR_BRAKE
Definition: RigDef_File.h:366
RigDef::NodeOption::c_NO_GROUND_CONTACT
@ c_NO_GROUND_CONTACT
RigDef::BaseWheel::num_rays
unsigned int num_rays
Definition: RigDef_File.h:268
RigDef::Shock2::OPTION_M_ABSOLUTE_METRIC
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
Definition: RigDef_File.h:1086
RigDef::Inertia::stop_delay_factor
float stop_delay_factor
Definition: RigDef_File.h:306
RigDef::Serializer::ProcessPropsAndAnimations
void ProcessPropsAndAnimations(Document::Module *module)
Definition: RigDef_Serializer.cpp:725
RigDef::Serializer::ProcessContacters
void ProcessContacters(Document::Module *module)
Definition: RigDef_Serializer.cpp:1440
RigDef::Serializer::ProcessTorqueCurve
void ProcessTorqueCurve(Document::Module *module)
Definition: RigDef_Serializer.cpp:1025
RigDef::DefaultMinimass
Definition: RigDef_File.h:657
RigDef::BaseWheel::rigidity_node
Node::Ref rigidity_node
Definition: RigDef_File.h:270
RigDef::Document::Module::rotators2
std::vector< Rotator2 > rotators2
Definition: RigDef_File.h:1417
RigDef::Document::Module::description
std::vector< Ogre::String > description
Definition: RigDef_File.h:1381
RigDef::Hydro::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:869
keyword
static int keyword
Definition: Bench_TruckParser_IdentifyKeyword.cpp:1448
RigDef::Serializer::Serialize
void Serialize()
Definition: RigDef_Serializer.cpp:50
RigDef::Serializer::ProcessAnimators
void ProcessAnimators(Document::Module *module)
Definition: RigDef_Serializer.cpp:1376
RigDef
Definition: Application.cpp:702
RigDef::Node::load_weight_override
float load_weight_override
Definition: RigDef_Node.h:161
RigDef::Serializer::ProcessExtCamera
void ProcessExtCamera(Document::Module *module)
Definition: RigDef_Serializer.cpp:420
RigDef::Trigger::OPTION_x_START_DISABLED
static const BitMask_t OPTION_x_START_DISABLED
Definition: RigDef_File.h:1254
RigDef::Serializer::ProcessWheels2
void ProcessWheels2(Document::Module *module)
Definition: RigDef_Serializer.cpp:1741
RigDef::CruiseControl::autobrake
int autobrake
Definition: RigDef_File.h:654
RigDef::NodeOption::h_HOOK_POINT
@ h_HOOK_POINT
RigDef::Serializer::ProcessFlares2
void ProcessFlares2(Document::Module *module)
Definition: RigDef_Serializer.cpp:801
RigDef::Node::Id::Str
const std::string & Str() const
Definition: RigDef_Node.h:61
RigDef::Serializer::ProcessPistonprops
void ProcessPistonprops(Document::Module *module)
Definition: RigDef_Serializer.cpp:173
RigDef::Hydro::OPTION_a_INPUT_AILERON
static const BitMask_t OPTION_a_INPUT_AILERON
Definition: RigDef_File.h:857
RigDef::TractionControl
Definition: RigDef_File.h:1228
BITMASK_IS_1
#define BITMASK_IS_1(VAR, FLAGS)
Definition: BitFlags.h:14
RigDef::Animation::MODE_OFFSET_Z
static const BitMask_t MODE_OFFSET_Z
Definition: RigDef_File.h:403
RigDef::Serializer::ProcessCameras
void ProcessCameras(Document::Module *module)
Definition: RigDef_Serializer.cpp:1891
RigDef::SlideNode::slide_node
Node::Ref slide_node
Definition: RigDef_File.h:1145
RigDef::Document::Module::animators
std::vector< Animator > animators
Definition: RigDef_File.h:1366
RigDef::Wing::max_deflection
float max_deflection
Definition: RigDef_File.h:1348
RigDef::Keyword::SHOCKS2
@ SHOCKS2
RigDef::Document::Module::turboprops2
std::vector< Turboprop2 > turboprops2
Definition: RigDef_File.h:1437
RigDef::Node::id
Id id
Definition: RigDef_Node.h:158
RigDef::Cab::OPTION_c_CONTACT
static const BitMask_t OPTION_c_CONTACT
Definition: RigDef_File.h:573
RigDef::VideoCamera::alt_orientation_node
Node::Ref alt_orientation_node
Definition: RigDef_File.h:1304
RigDef::VideoCamera::bottom_node
Node::Ref bottom_node
Definition: RigDef_File.h:1302
RigDef::Engine::torque
float torque
Definition: RigDef_File.h:671
RigDef::Document::Module::triggers
std::vector< Trigger > triggers
Definition: RigDef_File.h:1435
RigDef::Flare2::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:740
RigDef::Tie::max_length
float max_length
Definition: RigDef_File.h:1203
RigDef::Serializer::ResetPresets
void ResetPresets()
Definition: RigDef_Serializer.cpp:2630
RigDef::Serializer::ProcessGuid
void ProcessGuid(Document::Module *module)
Definition: RigDef_Serializer.cpp:2572
RigDef::ManagedMaterial::specular_map
Ogre::String specular_map
Definition: RigDef_File.h:907
RigDef::Serializer::m_command_key_width
int m_command_key_width
Definition: RigDef_Serializer.h:171
RigDef::NodeOption::l_LOAD_WEIGHT
@ l_LOAD_WEIGHT
RigDef::Flare2::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:743
RigDef::Fileinfo::file_version
int file_version
Definition: RigDef_File.h:735
RigDef::Serializer::ProcessAntiLockBrakes
void ProcessAntiLockBrakes(Document::Module *module)
Definition: RigDef_Serializer.cpp:1642
RigDef::SlideNode::railgroup_id
int railgroup_id
Definition: RigDef_File.h:1154
RigDef::Shock2::short_bound
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1097
RigDef::Airbrake::height
float height
Definition: RigDef_File.h:332
RigDef::Shock3::spring_in
float spring_in
Spring value applied when the shock is compressing.
Definition: RigDef_File.h:1114
RigDef::Shock2::precompression
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
Definition: RigDef_File.h:1099
RigDef::Tie::max_reach_length
float max_reach_length
Definition: RigDef_File.h:1200
RigDef::Prop::DashboardSpecial::_offset_is_set
bool _offset_is_set
Definition: RigDef_File.h:971
RigDef::Animation::MODE_OFFSET_X
static const BitMask_t MODE_OFFSET_X
Definition: RigDef_File.h:401
RigDef::Wing::nodes
Node::Ref nodes[8]
Definition: RigDef_File.h:1343
RigDef::Airbrake::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:326
RigDef::Animation::MODE_ROTATION_Z
static const BitMask_t MODE_ROTATION_Z
Definition: RigDef_File.h:400
RigDef::Document::Module::extcamera
std::vector< ExtCamera > extcamera
Definition: RigDef_File.h:1386
RigDef::Hydro::OPTION_v_INPUT_InvAILERON_ELEVATOR
static const BitMask_t OPTION_v_INPUT_InvAILERON_ELEVATOR
Definition: RigDef_File.h:861
RigDef::MeshWheel
Definition: RigDef_File.h:924
RigDef::Animation::SOURCE_STEERING_WHEEL
static const BitMask64_t SOURCE_STEERING_WHEEL
Definition: RigDef_File.h:385
RigDef::ManagedMaterial
Definition: RigDef_File.h:900
RigDef::TransferCase::a1
int a1
Definition: RigDef_File.h:1243
RigDef::Document::Module::rotators
std::vector< Rotator > rotators
Definition: RigDef_File.h:1416
RigDef::Airbrake::aditional_node
Node::Ref aditional_node
Definition: RigDef_File.h:329
RigDef::Serializer::ProcessMeshWheels
void ProcessMeshWheels(Document::Module *module)
Definition: RigDef_Serializer.cpp:1858
RigDef::InterAxle
Definition: RigDef_File.h:878
RigDef::Serializer::ProcessBeams
void ProcessBeams(Document::Module *)
Definition: RigDef_Serializer.cpp:1943
RigDef::Node::OPTION_L_LOG
static const BitMask_t OPTION_L_LOG
Definition: RigDef_Node.h:155
RigDef::NodeOption::n_DUMMY
@ n_DUMMY
RigDef::Shock2::progress_factor_spring_out
float progress_factor_spring_out
Progression factor springout, 0 = disabled, 1...x as multipliers, example:maximum springrate == sprin...
Definition: RigDef_File.h:1095
RigDef::Engoption::clutch_force
float clutch_force
Definition: RigDef_File.h:682
RigDef::Trigger::expansion_trigger_limit
float expansion_trigger_limit
Definition: RigDef_File.h:1266
RigDef::TriggerOption::A_INV_TRIGGER_BLOCKER
@ A_INV_TRIGGER_BLOCKER
Blocker that enable/disable other triggers, reversed activation method (inverted Blocker style,...
RigDef::Shock3::long_bound
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1125
RigDef::SlideNode::_break_force_set
bool _break_force_set
Definition: RigDef_File.h:1151
RigDef::Flexbody::mesh_name
Ogre::String mesh_name
Definition: RigDef_File.h:780
RigDef::Serializer::ProcessLockgroups
void ProcessLockgroups(Document::Module *module)
Definition: RigDef_Serializer.cpp:1290
RigDef::AntiLockBrakes::attr_is_on
bool attr_is_on
Definition: RigDef_File.h:471
RigDef::Animation::SOURCE_SHIFT_LEFT_RIGHT
static const BitMask64_t SOURCE_SHIFT_LEFT_RIGHT
Definition: RigDef_File.h:376
RigDef::Serializer::ProcessSoundsources2
void ProcessSoundsources2(Document::Module *module)
Definition: RigDef_Serializer.cpp:398
RigDef::TransferCase::gear_ratios
std::vector< float > gear_ratios
Definition: RigDef_File.h:1247
RigDef::Submesh
Definition: RigDef_File.h:1180
RigDef::Shock3::damp_in_fast
float damp_in_fast
Damping value applied when shock is commpressing faster than split in velocity.
Definition: RigDef_File.h:1120
RigDef::NodeOption::m_NO_MOUSE_GRAB
@ m_NO_MOUSE_GRAB
RigDef::Keyword::SLIDENODES
@ SLIDENODES
RigDef::Shock3::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:1113
RigDef::Document::Module::flares2
std::vector< Flare2 > flares2
Definition: RigDef_File.h:1390
RigDef::Hook::flag_no_disable
bool flag_no_disable
Definition: RigDef_File.h:846
RigDef::Animation::ratio
float ratio
Definition: RigDef_File.h:409
RigDef::Airbrake::max_inclination_angle
float max_inclination_angle
Definition: RigDef_File.h:333
RigDef::Wing::min_deflection
float min_deflection
Definition: RigDef_File.h:1347
RigDef::Inertia
Definition: RigDef_File.h:298
RigDef::Trigger::OPTION_s_CMD_NUM_SWITCH
static const BitMask_t OPTION_s_CMD_NUM_SWITCH
Definition: RigDef_File.h:1258
RigDef::Animation::mode
BitMask_t mode
Definition: RigDef_File.h:414
RigDef::Animation::SOURCE_HEADING
static const BitMask64_t SOURCE_HEADING
Definition: RigDef_File.h:381
RigDef::Axle::options
DifferentialTypeVec options
Order matters!
Definition: RigDef_File.h:488
RigDef::BaseMeshWheel::damping
float damping
Definition: RigDef_File.h:287
RigDef::Shock
Definition: RigDef_File.h:1061
RigDef::Document::Module::shocks
std::vector< Shock > shocks
Definition: RigDef_File.h:1420
RigDef::Command2::lengthen_rate
float lengthen_rate
Definition: RigDef_File.h:629
RigDef::BaseMeshWheel
Definition: RigDef_File.h:279
RigDef::Shock2::progress_factor_spring_in
float progress_factor_spring_in
Progression factor for springin. A value of 0 disables this option. 1...x as multipliers,...
Definition: RigDef_File.h:1091
RigDef::Document::Module::cameras
std::vector< Camera > cameras
Definition: RigDef_File.h:1373
RigDef::Serializer::ProcessScrewprops
void ProcessScrewprops(Document::Module *module)
Definition: RigDef_Serializer.cpp:230
RigDef::Trigger::shortbound_trigger_action
int shortbound_trigger_action
Definition: RigDef_File.h:1271
RigDef::Hydro::OPTION_y_INPUT_InvAILERON_RUDDER
static const BitMask_t OPTION_y_INPUT_InvAILERON_RUDDER
Definition: RigDef_File.h:863
RigDef::Animation::SOURCE_PERMANENT
static const BitMask64_t SOURCE_PERMANENT
Definition: RigDef_File.h:389
RigDef::Beam::OPTION_s_SUPPORT
static const BitMask_t OPTION_s_SUPPORT
Definition: RigDef_File.h:495
RigDef::Rotator::engine_coupling
float engine_coupling
Definition: RigDef_File.h:1032
RigDef::Serializer::ProcessRotators
void ProcessRotators(Document::Module *module)
Definition: RigDef_Serializer.cpp:1456
RigDef::Hook::option_hook_range
float option_hook_range
Definition: RigDef_File.h:837
RigDef::BeamDefaults::visual_beam_diameter
float visual_beam_diameter
Definition: RigDef_File.h:557
RigDef::Shock3::options
BitMask_t options
Definition: RigDef_File.h:1127
RigDef::ManagedMaterial::TypeToStr
static const char * TypeToStr(ManagedMaterialType type)
Definition: RigDef_File.cpp:162
RigDef::HydroOption::g_INPUT_ELEVATOR_RUDDER
@ g_INPUT_ELEVATOR_RUDDER
RigDef::Trigger::OPTION_b_KEY_BLOCKER
static const BitMask_t OPTION_b_KEY_BLOCKER
Definition: RigDef_File.h:1255
RigDef::Serializer::ProcessSoundsources
void ProcessSoundsources(Document::Module *module)
Definition: RigDef_Serializer.cpp:378
RigDef::Serializer::ProcessHooks
void ProcessHooks(Document::Module *module)
Definition: RigDef_Serializer.cpp:1252
RigDef::SpecialProp::BEACON
@ BEACON
RigDef::Engoption::stall_rpm
float stall_rpm
Definition: RigDef_File.h:687
RigDef::MaterialFlareBinding
Definition: RigDef_File.h:912
RigDef::TriggerOption::b_KEY_BLOCKER
@ b_KEY_BLOCKER
Set the CommandKeys that are set in a commandkeyblocker or trigger to blocked on startup,...
RigDef::Beam::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:493
RigDef::Animation::SOURCE_ALTIMETER_1K
static const BitMask64_t SOURCE_ALTIMETER_1K
Definition: RigDef_File.h:363
RigDef::Prop::mesh_name
Ogre::String mesh_name
Definition: RigDef_File.h:992
RigDef::HydroOption::r_INPUT_RUDDER
@ r_INPUT_RUDDER
RigDef::VideoCamera::field_of_view
float field_of_view
Definition: RigDef_File.h:1307
RigDef::Document::Module::engine
std::vector< Engine > engine
Definition: RigDef_File.h:1382
RigDef::Rope::invisible
bool invisible
Definition: RigDef_File.h:1017
RigDef::Keyword::COLLISIONBOXES
@ COLLISIONBOXES
RigDef::Serializer::ExportDocComment
void ExportDocComment(Document::Module *module, RigDef::Keyword keyword, ptrdiff_t vectorpos)
Definition: RigDef_Serializer.cpp:2658
RigDef::Serializer::ProcessWheels
void ProcessWheels(Document::Module *module)
Definition: RigDef_Serializer.cpp:1781
RigDef::Beam::defaults
std::shared_ptr< BeamDefaults > defaults
Definition: RigDef_File.h:502
RigDef::Lockgroup
Definition: RigDef_File.h:885
RigDef::Hook::option_max_force
float option_max_force
Definition: RigDef_File.h:839
RigDef::Flare2::node_axis_x
Node::Ref node_axis_x
Definition: RigDef_File.h:741
RigDef::Animator
Definition: RigDef_File.h:421
RigDef::Document::Module::exhausts
std::vector< Exhaust > exhausts
Definition: RigDef_File.h:1385
RigDef::Serializer::UpdatePresets
void UpdatePresets(BeamDefaults *beam, NodeDefaults *node, DefaultMinimass *minimass)
Definition: RigDef_Serializer.cpp:2637
RigDef::TriggerOption::H_LOCKS_HOOK_GROUP
@ H_LOCKS_HOOK_GROUP
RigDef::Brakes::parking_brake_force
float parking_brake_force
Definition: RigDef_File.h:568
RigDef::NodeDefaults::load_weight
float load_weight
Definition: RigDef_File.h:934
RigDef::Author::email
Ogre::String email
Definition: RigDef_File.h:481
RigDef::Rope::end_node
Node::Ref end_node
Definition: RigDef_File.h:1016
RigDef::Flexbody
Definition: RigDef_File.h:773
RigDef::Keyword::WHEELS
@ WHEELS
RigDef::Serializer::ProcessCommand2
void ProcessCommand2(Command2 &def)
Definition: RigDef_Serializer.cpp:2107
RigDef::Document::Module::railgroups
std::vector< RailGroup > railgroups
Definition: RigDef_File.h:1413
RigDef::Hook::option_min_range_meters
float option_min_range_meters
Definition: RigDef_File.h:843
RigDef::SpecialProp::DASHBOARD_RIGHT
@ DASHBOARD_RIGHT
RigDef::Command2::option_i_invisible
bool option_i_invisible
Definition: RigDef_File.h:643
RigDef::Trigger::OPTION_h_UNLOCKS_HOOK_GROUP
static const BitMask_t OPTION_h_UNLOCKS_HOOK_GROUP
Definition: RigDef_File.h:1259
RigDef::VideoCamera
Definition: RigDef_File.h:1298
RigDef::Cab::OPTION_D_CONTACT_BUOYANT
static const BitMask_t OPTION_D_CONTACT_BUOYANT
Definition: RigDef_File.h:579
RigDef::TriggerOption::h_UNLOCKS_HOOK_GROUP
@ h_UNLOCKS_HOOK_GROUP
RigDef::Shock2::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:1088
RigDef::TransferCase
Definition: RigDef_File.h:1241
RigDef::Rotator::inertia
Inertia inertia
Definition: RigDef_File.h:1030
RigDef::Trigger::OPTION_t_CONTINUOUS
static const BitMask_t OPTION_t_CONTINUOUS
Definition: RigDef_File.h:1261
RigDef::Animation::SOURCE_ACCEL
static const BitMask64_t SOURCE_ACCEL
Definition: RigDef_File.h:370
RigDef::Submesh::texcoords
std::vector< Texcoord > texcoords
Definition: RigDef_File.h:1183
RigDef::Wing::airfoil
Ogre::String airfoil
Definition: RigDef_File.h:1349
RigDef::HydroOption::n_INPUT_NORMAL
@ n_INPUT_NORMAL
RigDef::Submesh::cab_triangles
std::vector< Cab > cab_triangles
Definition: RigDef_File.h:1184
RigDef::Shock::precompression
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
Definition: RigDef_File.h:1073
RigDef::Shock2::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:1101
RigDef::Turboprop2
Definition: RigDef_File.h:1288
RigDef::Serializer::ProcessSubmeshGroundmodel
void ProcessSubmeshGroundmodel(Document::Module *module)
Definition: RigDef_Serializer.cpp:536
RigDef::TractionControl::wheel_slip
float wheel_slip
Definition: RigDef_File.h:1233
RigDef::Serializer::m_rig_def
RigDef::DocumentPtr m_rig_def
Definition: RigDef_Serializer.h:166
RigDef::Document::Module::props
std::vector< Prop > props
Definition: RigDef_File.h:1412
RigDef::Serializer::ProcessFlexbodies
void ProcessFlexbodies(Document::Module *module)
Definition: RigDef_Serializer.cpp:671
RigDef::Serializer::ProcessAirbrakes
void ProcessAirbrakes(Document::Module *module)
Definition: RigDef_Serializer.cpp:303
RigDef::Inertia::start_delay_factor
float start_delay_factor
Definition: RigDef_File.h:305
RigDef::Prop::y_axis_node
Node::Ref y_axis_node
Definition: RigDef_File.h:989
RigDef::TractionControl::attr_is_on
bool attr_is_on
Definition: RigDef_File.h:1236
RigDef::Fusedrag::front_node
Node::Ref front_node
Definition: RigDef_File.h:802
RigDef::Serializer::ProcessShocks2
void ProcessShocks2(Document::Module *)
Definition: RigDef_Serializer.cpp:1997
RigDef::Serializer::ProcessTies
void ProcessTies(Document::Module *module)
Definition: RigDef_Serializer.cpp:1093
RigDef::Cab::OPTION_s_BUOYANT_NO_DRAG
static const BitMask_t OPTION_s_BUOYANT_NO_DRAG
Definition: RigDef_File.h:577
RigDef::BaseMeshWheel::tyre_radius
float tyre_radius
Definition: RigDef_File.h:285
RigDef::VideoCamera::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:1305
RigDef::Hydro::OPTION_s_DISABLE_ON_HIGH_SPEED
static const BitMask_t OPTION_s_DISABLE_ON_HIGH_SPEED
Definition: RigDef_File.h:855
RigDef::Engine::reverse_gear_ratio
float reverse_gear_ratio
Definition: RigDef_File.h:673
RigDef::Document::Module::fileinfo
std::vector< Fileinfo > fileinfo
Definition: RigDef_File.h:1389
RigDef::Trigger::OPTION_E_ENGINE_TRIGGER
static const BitMask_t OPTION_E_ENGINE_TRIGGER
Definition: RigDef_File.h:1262
RigDef::Node::OPTION_y_EXHAUST_DIRECTION
static const BitMask_t OPTION_y_EXHAUST_DIRECTION
Definition: RigDef_Node.h:149
RigDef::ManagedMaterialsOptions::double_sided
bool double_sided
Definition: RigDef_File.h:897
RigDef::Serializer::ProcessExhausts
void ProcessExhausts(Document::Module *module)
Definition: RigDef_Serializer.cpp:514
RigDef::Animation::SOURCE_TURBO
static const BitMask64_t SOURCE_TURBO
Definition: RigDef_File.h:374
RigDef::Exhaust::direction_node
Node::Ref direction_node
Definition: RigDef_File.h:716
RigDef::Rotator::rotating_plate_nodes
Node::Ref rotating_plate_nodes[4]
Definition: RigDef_File.h:1026
RigDef::CabOption::r_BUOYANT_ONLY_DRAG
@ r_BUOYANT_ONLY_DRAG
RigDef::Flexbody::node_list
std::vector< Node::Ref > node_list
Definition: RigDef_File.h:783
RigDef::Node::OPTION_b_EXTRA_BUOYANCY
static const BitMask_t OPTION_b_EXTRA_BUOYANCY
Definition: RigDef_Node.h:153
RigDef::Serializer::ProcessAxles
void ProcessAxles(Document::Module *module)
Definition: RigDef_Serializer.cpp:914
RigDef::Document::Module::shocks3
std::vector< Shock3 > shocks3
Definition: RigDef_File.h:1422
RigDef::Document::Module::submesh_groundmodel
std::vector< Ogre::String > submesh_groundmodel
Definition: RigDef_File.h:1429
RigDef::SkeletonSettings::visibility_range_meters
float visibility_range_meters
Definition: RigDef_File.h:1134
RigDef::Node::OPTION_c_NO_GROUND_CONTACT
static const BitMask_t OPTION_c_NO_GROUND_CONTACT
Definition: RigDef_Node.h:150
RigDef::HydroOption::j_INVISIBLE
@ j_INVISIBLE
RigDef::Exhaust::particle_name
Ogre::String particle_name
Definition: RigDef_File.h:717
RigDef::Exhaust::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:715
RigDef::Tie
Definition: RigDef_File.h:1194
RigDef::SlideNode::CONSTRAINT_ATTACH_NONE
static const BitMask_t CONSTRAINT_ATTACH_NONE
Definition: RigDef_File.h:1143
RigDef::Hydro::OPTION_h_INPUT_InvELEVATOR_RUDDER
static const BitMask_t OPTION_h_INPUT_InvELEVATOR_RUDDER
Definition: RigDef_File.h:865
RigDef::Serializer::SerializeModule
void SerializeModule(std::shared_ptr< RigDef::Document::Module > m)
Definition: RigDef_Serializer.cpp:86
RigDef::Flare2::size
float size
Definition: RigDef_File.h:748
RigDef::Document::Module::flexbodywheels
std::vector< FlexBodyWheel > flexbodywheels
Definition: RigDef_File.h:1394
RigDef::ManagedMaterialType::FLEXMESH_TRANSPARENT
@ FLEXMESH_TRANSPARENT
RigDef::Document::Module::materialflarebindings
std::vector< MaterialFlareBinding > materialflarebindings
Definition: RigDef_File.h:1405
RigDef::Node::OPTION_h_HOOK_POINT
static const BitMask_t OPTION_h_HOOK_POINT
Definition: RigDef_Node.h:151
RigDef::BeamDefaults::plastic_deform_coef
float plastic_deform_coef
Definition: RigDef_File.h:559
RigDef::Rotator2::tolerance
float tolerance
Definition: RigDef_File.h:1039
RigDef::Rotator
Definition: RigDef_File.h:1022
RigDef::Serializer::ProcessSetSkeletonSettings
void ProcessSetSkeletonSettings(Document::Module *module)
Definition: RigDef_Serializer.cpp:488
RigDef::TransferCase::has_2wd
bool has_2wd
Definition: RigDef_File.h:1245
RigDef::NodeOption::f_NO_SPARKS
@ f_NO_SPARKS
RigDef::Serializer::m_dataline_indentstr
std::string m_dataline_indentstr
a node or a beam line for example
Definition: RigDef_Serializer.h:173
RigDef::Fusedrag
Definition: RigDef_File.h:797
RigDef::Trigger::boundary_timer
float boundary_timer
Definition: RigDef_File.h:1268
RigDef::Animation::SOURCE_BRAKES
static const BitMask64_t SOURCE_BRAKES
Definition: RigDef_File.h:369
RigDef::Serializer::ProcessHelp
void ProcessHelp(Document::Module *module)
Definition: RigDef_Serializer.cpp:1732
RigDef::Document::Module::videocameras
std::vector< VideoCamera > videocameras
Definition: RigDef_File.h:1438
RigDef::Airbrake::texcoord_y2
float texcoord_y2
Definition: RigDef_File.h:337
RigDef::Engine
Definition: RigDef_File.h:667
RigDef::Serializer::m_setdefaults_indentstr
std::string m_setdefaults_indentstr
'set_beam_defaults' for example
Definition: RigDef_Serializer.h:174
RigDef::Serializer::ProcessBeam
void ProcessBeam(Beam &beam)
Definition: RigDef_Serializer.cpp:2348
RigDef::Trigger::contraction_trigger_limit
float contraction_trigger_limit
Definition: RigDef_File.h:1265
RigDef::Node::node_defaults
std::shared_ptr< NodeDefaults > node_defaults
Definition: RigDef_Node.h:163
RigDef::TriggerOption::E_ENGINE_TRIGGER
@ E_ENGINE_TRIGGER
this trigger is used to control an engine
RigDef::Serializer::ProcessDirectiveAddAnimation
void ProcessDirectiveAddAnimation(RigDef::Animation &anim)
Definition: RigDef_Serializer.cpp:606
RigDef::Author::type
Ogre::String type
Definition: RigDef_File.h:478
RigDef::Shock3::split_vel_in
float split_vel_in
Split velocity in (m/s) - threshold for slow / fast damping during compression.
Definition: RigDef_File.h:1119
RigDef::TractionControl::attr_no_toggle
bool attr_no_toggle
Definition: RigDef_File.h:1238
RigDef::Serializer::m_current_beam_defaults
BeamDefaults * m_current_beam_defaults
Definition: RigDef_Serializer.h:176
RigDef::Keyword::COMMANDS2
@ COMMANDS2
RigDef::Serializer::ProcessSpeedLimiter
void ProcessSpeedLimiter(Document::Module *module)
Definition: RigDef_Serializer.cpp:1014
RigDef::Beam::options
BitMask_t options
Definition: RigDef_File.h:498
RigDef::Keyword::HYDROS
@ HYDROS
DEFAULT_SPRING
static const float DEFAULT_SPRING
Definition: SimConstants.h:48
RigDef::Document::Module::antilockbrakes
std::vector< AntiLockBrakes > antilockbrakes
Definition: RigDef_File.h:1367
RigDef::Hydro::OPTION_j_INVISIBLE
static const BitMask_t OPTION_j_INVISIBLE
Definition: RigDef_File.h:853
RigDef::Animation::source
BitMask64_t source
Definition: RigDef_File.h:412
RigDef::Shock3::short_bound
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1124
RigDef::CabOption::s_BUOYANT_NO_DRAG
@ s_BUOYANT_NO_DRAG
RigDef::Engoption::idle_rpm
float idle_rpm
Definition: RigDef_File.h:686
RigDef::Shock2::progress_factor_damp_in
float progress_factor_damp_in
Progression factor for dampin. 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spr...
Definition: RigDef_File.h:1092
RigDef::Shock3::OPTION_M_ABSOLUTE_METRIC
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
Definition: RigDef_File.h:1111
RigDef::Node::options
BitMask_t options
Definition: RigDef_Node.h:160
RigDef::BaseWheel::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:276
RigDef::Serializer::ProcessSubmesh
void ProcessSubmesh(Document::Module *module)
Definition: RigDef_Serializer.cpp:546
RigDef::Rotator2
Definition: RigDef_File.h:1036
RigDef::Shock::options
BitMask_t options
Definition: RigDef_File.h:1074
RigDef::Command2::affect_engine
float affect_engine
Definition: RigDef_File.h:636
RigDef::Author::forum_account_id
unsigned int forum_account_id
Definition: RigDef_File.h:479
RigDef::Keyword::WHEELS2
@ WHEELS2
RigDef::Serializer::ProcessTransferCase
void ProcessTransferCase(Document::Module *module)
Definition: RigDef_Serializer.cpp:978
RigDef::BaseMeshWheel::mesh_name
Ogre::String mesh_name
Definition: RigDef_File.h:282
RigDef::Serializer::m_node_id_width
int m_node_id_width
Definition: RigDef_Serializer.h:170
RigDef::SlideNode::CONSTRAINT_ATTACH_ALL
static const BitMask_t CONSTRAINT_ATTACH_ALL
Definition: RigDef_File.h:1140
RigDef::Shock3
Definition: RigDef_File.h:1105
RigDef::Exhaust
Definition: RigDef_File.h:713
RigDef::Document::Module::flexbodies
std::vector< Flexbody > flexbodies
Definition: RigDef_File.h:1393
ANIMATOR_ADD_FLAG
#define ANIMATOR_ADD_FLAG(DEF_VAR, AND_VAR, BITMASK_CONST, NAME_STR)
Definition: RigDef_Serializer.cpp:1355
RigDef::Airbrake::width
float width
Definition: RigDef_File.h:331
RigDef::Command2::contract_key
RoR::CommandkeyID_t contract_key
Definition: RigDef_File.h:632
RigDef::Animation::MODE_ROTATION_X
static const BitMask_t MODE_ROTATION_X
Definition: RigDef_File.h:398
RigDef::Document::Module::hydros
std::vector< Hydro > hydros
Definition: RigDef_File.h:1401
RigDef::VideoCamera::max_clip_distance
float max_clip_distance
Definition: RigDef_File.h:1311
RigDef::CabOption::u_INVULNERABLE
@ u_INVULNERABLE
DEFAULT_DAMP
static const float DEFAULT_DAMP
Definition: SimConstants.h:49
RigDef::Document::Module::ropables
std::vector< Ropable > ropables
Definition: RigDef_File.h:1414
RigDef::HydroOption::s_DISABLE_ON_HIGH_SPEED
@ s_DISABLE_ON_HIGH_SPEED
RigDef::Document::Module::managedmaterials
std::vector< ManagedMaterial > managedmaterials
Definition: RigDef_File.h:1404
RigDef::Prop::special_prop_dashboard
DashboardSpecial special_prop_dashboard
Definition: RigDef_File.h:997
RigDef::SpecialProp::DASHBOARD_LEFT
@ DASHBOARD_LEFT
RigDef::Beam::OPTION_r_ROPE
static const BitMask_t OPTION_r_ROPE
Definition: RigDef_File.h:494
RigDef::Animation::SOURCE_CLUTCH
static const BitMask64_t SOURCE_CLUTCH
Definition: RigDef_File.h:371
RigDef::Animation::MODE_OFFSET_Y
static const BitMask_t MODE_OFFSET_Y
Definition: RigDef_File.h:402
RigDef::Fusedrag::airfoil_name
Ogre::String airfoil_name
Definition: RigDef_File.h:805
RigDef::Cab::OPTION_F_10xTOUGHER_BUOYANT
static const BitMask_t OPTION_F_10xTOUGHER_BUOYANT
Definition: RigDef_File.h:580
RigDef::Flare2::control_number
int control_number
Only 'u' type flares.
Definition: RigDef_File.h:745
RigDef::Shock2::damp_in
float damp_in
Damping value applied when the shock is compressing.
Definition: RigDef_File.h:1090
RigDef::Lockgroup::nodes
std::vector< Node::Ref > nodes
Definition: RigDef_File.h:892
RigDef::Tie::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:1196
BitMask_t
uint32_t BitMask_t
Definition: BitFlags.h:7
RigDef::Axle
Definition: RigDef_File.h:485
RigDef::Shock2::options
BitMask_t options
Definition: RigDef_File.h:1100
RigDef::Fusedrag::area_coefficient
float area_coefficient
Definition: RigDef_File.h:806
RigDef::Serializer::ProcessHydros
void ProcessHydros(Document::Module *)
Definition: RigDef_Serializer.cpp:2052
RigDef::SlideNode::_attachment_rate_set
bool _attachment_rate_set
Definition: RigDef_File.h:1153
RigDef::Document::Module::collisionboxes
std::vector< CollisionBox > collisionboxes
Definition: RigDef_File.h:1375
RigDef::Shock::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:1068
RigDef::Serializer::ProcessShock3
void ProcessShock3(Shock3 &def)
Definition: RigDef_Serializer.cpp:2280
PropAnimFlag
void PropAnimFlag(std::stringstream &out, int flags, bool &join, unsigned int mask, const char *name, char joiner='|')
Definition: RigDef_Serializer.cpp:593
RigDef::HydroOption::x_INPUT_AILERON_RUDDER
@ x_INPUT_AILERON_RUDDER
RigDef::Tie::root_node
Node::Ref root_node
Definition: RigDef_File.h:1199
RigDef::TransferCase::has_2wd_lo
bool has_2wd_lo
Definition: RigDef_File.h:1246
RigDef::Lockgroup::number
int number
Definition: RigDef_File.h:891
RigDef::Node
Definition: RigDef_Node.h:39
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: ForwardDeclarations.h:281
RigDef::Cab::OPTION_r_BUOYANT_ONLY_DRAG
static const BitMask_t OPTION_r_BUOYANT_ONLY_DRAG
Definition: RigDef_File.h:578
RigDef::Keyword::LOCKGROUPS
@ LOCKGROUPS
RigDef::BaseWheel::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:269
RigDef::VideoCamera::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:1300
RigDef::Node::OPTION_e_TERRAIN_EDIT_POINT
static const BitMask_t OPTION_e_TERRAIN_EDIT_POINT
Definition: RigDef_Node.h:152
RigDef::SoundSource
Definition: RigDef_File.h:1158
RigDef::RailGroup::node_list
std::vector< Node::Range > node_list
Definition: RigDef_File.h:1003
RigDef::Shock3::OPTION_m_METRIC
static const BitMask_t OPTION_m_METRIC
Definition: RigDef_File.h:1110
RigDef::Keyword::TRIGGERS
@ TRIGGERS
RigDef::Document::Module::torquecurve
std::vector< TorqueCurve > torquecurve
Definition: RigDef_File.h:1432
RigDef::Document::Module::speedlimiter
std::vector< SpeedLimiter > speedlimiter
Definition: RigDef_File.h:1428
RigDef::HydroOption::h_INPUT_InvELEVATOR_RUDDER
@ h_INPUT_InvELEVATOR_RUDDER
RigDef::BaseWheel::node_defaults
std::shared_ptr< NodeDefaults > node_defaults
Definition: RigDef_File.h:275
RigDef::Airbrake::texcoord_x2
float texcoord_x2
Definition: RigDef_File.h:335
RigDef::Animation::SOURCE_SHIFT_BACK_FORTH
static const BitMask64_t SOURCE_SHIFT_BACK_FORTH
Definition: RigDef_File.h:377
RigDef::Hook::option_lockgroup
int option_lockgroup
Definition: RigDef_File.h:841
RigDef::Hook::flag_no_rope
bool flag_no_rope
Definition: RigDef_File.h:847
RigDef::CabOption::p_10xTOUGHER
@ p_10xTOUGHER
RigDef::AntiLockBrakes::regulation_force
float regulation_force
Definition: RigDef_File.h:468
RigDef::Trigger::OPTION_H_LOCKS_HOOK_GROUP
static const BitMask_t OPTION_H_LOCKS_HOOK_GROUP
Definition: RigDef_File.h:1260
RigDef::Keyword::CINECAM
@ CINECAM
RigDef::Cab::OPTION_S_INVULNERABLE_BUOYANT
static const BitMask_t OPTION_S_INVULNERABLE_BUOYANT
Definition: RigDef_File.h:581
RigDef::Serializer::ProcessTractionControl
void ProcessTractionControl(Document::Module *module)
Definition: RigDef_Serializer.cpp:1609
RigDef::Shock::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:1063
RigDef::Shock::damping
float damping
The 'resistance to motion' of the shock. The best value is given by this equation: 2 * sqrt(suspended...
Definition: RigDef_File.h:1070
RigDef::Animator::lenghtening_factor
float lenghtening_factor
Definition: RigDef_File.h:454
RigDef::Rotator2::description
Ogre::String description
Definition: RigDef_File.h:1040
RigDef::Document::Module::soundsources
std::vector< SoundSource > soundsources
Definition: RigDef_File.h:1426
RigDef::Prop::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:987
RigDef::SlideNode::_max_attach_dist_set
bool _max_attach_dist_set
Definition: RigDef_File.h:1155
RigDef::Hydro::beam_defaults
std::shared_ptr< BeamDefaults > beam_defaults
Definition: RigDef_File.h:874
RigDef::Rotator::base_plate_nodes
Node::Ref base_plate_nodes[4]
Definition: RigDef_File.h:1025
RigDef::Serializer::m_bool_width
int m_bool_width
Definition: RigDef_Serializer.h:169
RigDef::Flexbody::x_axis_node
Node::Ref x_axis_node
Definition: RigDef_File.h:776
RigDef::Serializer::ProcessParticles
void ProcessParticles(Document::Module *module)
Definition: RigDef_Serializer.cpp:1048
RigDef::Animation::event_name
Ogre::String event_name
Definition: RigDef_File.h:415
RigDef::Airbrake::x_axis_node
Node::Ref x_axis_node
Definition: RigDef_File.h:327
RigDef::Particle::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:944
RigDef::Serializer::ProcessMaterialFlareBindings
void ProcessMaterialFlareBindings(Document::Module *module)
Definition: RigDef_Serializer.cpp:784
RigDef::Shock3::damp_out
float damp_out
Damping value applied when shock extending.
Definition: RigDef_File.h:1117
RigDef::Command2::option_c_auto_center
bool option_c_auto_center
Definition: RigDef_File.h:645
RigDef::Rotator::spin_left_key
unsigned int spin_left_key
Definition: RigDef_File.h:1028
RigDef::Serializer::ProcessRailGroups
void ProcessRailGroups(Document::Module *module)
Definition: RigDef_Serializer.cpp:1170
RigDef::Shock3::damp_in_slow
float damp_in_slow
Damping value applied when shock is commpressing slower than split in velocity.
Definition: RigDef_File.h:1118
RigDef::BeamDefaults::beam_material_name
Ogre::String beam_material_name
Definition: RigDef_File.h:558
RigDef::Serializer::ProcessDescription
void ProcessDescription(Document::Module *module)
Definition: RigDef_Serializer.cpp:2580
RigDef::Keyword::FLARES2
@ FLARES2
RigDef::Hydro::lenghtening_factor
float lenghtening_factor
Definition: RigDef_File.h:870
RigDef::VideoCamera::material_name
Ogre::String material_name
Definition: RigDef_File.h:1314
RigDef::Command2::max_contraction
float max_contraction
Definition: RigDef_File.h:630
RigDef::Command2::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:627
RigDef::ROOT_MODULE_NAME
const char * ROOT_MODULE_NAME
Definition: RigDef_File.cpp:35
RigDef::Keyword::TURBOJETS
@ TURBOJETS
RigDef::AntiLockBrakes::pulse_per_sec
float pulse_per_sec
Definition: RigDef_File.h:470
RigDef::Serializer::ProcessCruiseControl
void ProcessCruiseControl(Document::Module *module)
Definition: RigDef_Serializer.cpp:998
RigDef::Beam
Definition: RigDef_File.h:491
RigDef::Keyword::PROPS
@ PROPS
RigDef::Rotator2::rotating_force
float rotating_force
Definition: RigDef_File.h:1038
RigDef::Hook::option_timer
float option_timer
Definition: RigDef_File.h:842
RigDef::GuiSettings::value
std::string value
Definition: RigDef_File.h:824
RigDef::Animation::SOURCE_TORQUE
static const BitMask64_t SOURCE_TORQUE
Definition: RigDef_File.h:380
RigDef::Serializer::ProcessFixes
void ProcessFixes(Document::Module *module)
Definition: RigDef_Serializer.cpp:1121
RigDef::Serializer::ProcessNode
void ProcessNode(Node &node)
Definition: RigDef_Serializer.cpp:2505
RigDef::Prop::x_axis_node
Node::Ref x_axis_node
Definition: RigDef_File.h:988
RigDef::Animation::upper_limit
float upper_limit
Definition: RigDef_File.h:411
RigDef::ExtCamera::mode
RoR::ExtCameraMode mode
Definition: RigDef_File.h:722
RigDef::Inertia::stop_function
Ogre::String stop_function
Definition: RigDef_File.h:308
RigDef::Tie::OPTION_s_DISABLE_SELF_LOCK
static const BitMask_t OPTION_s_DISABLE_SELF_LOCK
Definition: RigDef_File.h:1197
RigDef::Animation::SOURCE_ALTIMETER_100K
static const BitMask64_t SOURCE_ALTIMETER_100K
Definition: RigDef_File.h:361
RigDef::Prop::DashboardSpecial::rotation_angle
float rotation_angle
Definition: RigDef_File.h:972
RigDef::Document::Module::particles
std::vector< Particle > particles
Definition: RigDef_File.h:1410
RigDef::Engoption::inertia
float inertia
Definition: RigDef_File.h:680
RigDef::Keyword::FLEXBODIES
@ FLEXBODIES
RigDef::Document::Module::beams
std::vector< Beam > beams
Definition: RigDef_File.h:1371
RigDef::CruiseControl
Definition: RigDef_File.h:651
RigDef::BaseMeshWheel::material_name
Ogre::String material_name
Definition: RigDef_File.h:283
RigDef::Hydro::OPTION_r_INPUT_RUDDER
static const BitMask_t OPTION_r_INPUT_RUDDER
Definition: RigDef_File.h:858
RigDef::Animation::MODE_NO_FLIP
static const BitMask_t MODE_NO_FLIP
Definition: RigDef_File.h:405
RigDef::Wing
Definition: RigDef_File.h:1341
RigDef::Serializer::ProcessInterAxles
void ProcessInterAxles(Document::Module *module)
Definition: RigDef_Serializer.cpp:946
RigDef::BaseWheel::reference_arm_node
Node::Ref reference_arm_node
Definition: RigDef_File.h:273
RigDef::Node::default_minimass
std::shared_ptr< DefaultMinimass > default_minimass
Definition: RigDef_Node.h:164
RigDef_File.h
Data structures representing 'truck' file format, see https://docs.rigsofrods.org/vehicle-creation/fi...
RigDef::Serializer::ProcessGlobals
void ProcessGlobals(Document::Module *module)
Definition: RigDef_Serializer.cpp:2613
RoR
Definition: AppContext.h:36
RigDef::ManagedMaterialsOptions
Definition: RigDef_File.h:895
RigDef::Hook::flag_visible
bool flag_visible
Definition: RigDef_File.h:848
RigDef::Document::Module::interaxles
std::vector< InterAxle > interaxles
Definition: RigDef_File.h:1402
RigDef::Fusedrag::rear_node
Node::Ref rear_node
Definition: RigDef_File.h:803
RigDef::Prop::special_prop_beacon
BeaconSpecial special_prop_beacon
Definition: RigDef_File.h:996
RigDef::Command2::needs_engine
bool needs_engine
Definition: RigDef_File.h:637
RigDef::RailGroup::id
unsigned int id
Definition: RigDef_File.h:1002
RigDef::ExtCamera
Definition: RigDef_File.h:720
RigDef::Keyword::BEAMS
@ BEAMS
RigDef::Shock2::progress_factor_damp_out
float progress_factor_damp_out
Progression factor dampout, 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spring...
Definition: RigDef_File.h:1096
RigDef::Flexbody::y_axis_node
Node::Ref y_axis_node
Definition: RigDef_File.h:777
RigDef::Rope
Definition: RigDef_File.h:1013
RigDef::Shock3::OPTION_i_INVISIBLE
static const BitMask_t OPTION_i_INVISIBLE
Definition: RigDef_File.h:1109
RigDef::Airbrake::offset
Ogre::Vector3 offset
Definition: RigDef_File.h:330
RigDef::Hook::option_speed_coef
float option_speed_coef
Definition: RigDef_File.h:838
RigDef::Ropable::group
int group
Definition: RigDef_File.h:1009
RigDef::Cab::OPTION_b_BUOYANT
static const BitMask_t OPTION_b_BUOYANT
Definition: RigDef_File.h:574
RigDef::Wing::efficacy_coef
float efficacy_coef
Definition: RigDef_File.h:1350
RigDef::CabOption::F_10xTOUGHER_BUOYANT
@ F_10xTOUGHER_BUOYANT
RigDef::Hydro::OPTION_x_INPUT_AILERON_RUDDER
static const BitMask_t OPTION_x_INPUT_AILERON_RUDDER
Definition: RigDef_File.h:862
RigDef::SlideNode
Definition: RigDef_File.h:1138
RigDef::TractionControl::regulation_force
float regulation_force
Definition: RigDef_File.h:1232
RigDef::TransferCase::a2
int a2
Definition: RigDef_File.h:1244
RigDef::MeshWheel2
Definition: RigDef_File.h:927
RigDef::Hook::flag_self_lock
bool flag_self_lock
Definition: RigDef_File.h:844
RigDef::Document::Module::meshwheels
std::vector< MeshWheel > meshwheels
Definition: RigDef_File.h:1406
RigDef::Document::Module::engoption
std::vector< Engoption > engoption
Definition: RigDef_File.h:1383
RigDef::SoundSource::sound_script_name
Ogre::String sound_script_name
Definition: RigDef_File.h:1161
RigDef::Keyword
Keyword
Definition: Application.h:171
RigDef::HydroOption::v_INPUT_InvAILERON_ELEVATOR
@ v_INPUT_InvAILERON_ELEVATOR
RigDef::Document::Module::tractioncontrol
std::vector< TractionControl > tractioncontrol
Definition: RigDef_File.h:1433
RigDef::CabOption::c_CONTACT
@ c_CONTACT
RigDef::Shock3::damp_out_slow
float damp_out_slow
Damping value applied when shock is commpressing slower than split out velocity.
Definition: RigDef_File.h:1121
RigDef::Prop::BeaconSpecial::flare_material_name
Ogre::String flare_material_name
Definition: RigDef_File.h:983
RigDef::Serializer::ProcessShocks
void ProcessShocks(Document::Module *)
Definition: RigDef_Serializer.cpp:1970
RigDef::Turboprop2::reference_node
Node::Ref reference_node
Definition: RigDef_File.h:1290
RigDef::Document::Module::fixes
std::vector< Node::Ref > fixes
Definition: RigDef_File.h:1388
RigDef::Prop::animations
std::list< Animation > animations
Definition: RigDef_File.h:993
RigDef::Hook::node
Node::Ref node
Definition: RigDef_File.h:836
RigDef::Document::Module::soundsources2
std::vector< SoundSource2 > soundsources2
Definition: RigDef_File.h:1427
RigDef::Beam::nodes
Node::Ref nodes[2]
Definition: RigDef_File.h:497
RigDef::Keyword::SOUNDSOURCES2
@ SOUNDSOURCES2
RigDef::Document::Module::guid
std::vector< Guid > guid
Definition: RigDef_File.h:1397
RigDef::Rope::root_node
Node::Ref root_node
Definition: RigDef_File.h:1015
RigDef::Keyword::TIES
@ TIES
RigDef::Fileinfo::category_id
int category_id
Definition: RigDef_File.h:734
RigDef::VideoCamera::camera_name
Ogre::String camera_name
Definition: RigDef_File.h:1315
RigDef::Submesh::backmesh
bool backmesh
Definition: RigDef_File.h:1182
RigDef::Node::OPTION_f_NO_SPARKS
static const BitMask_t OPTION_f_NO_SPARKS
Definition: RigDef_Node.h:147
RigDef::Animation::SOURCE_SEQUENTIAL_SHIFT
static const BitMask64_t SOURCE_SEQUENTIAL_SHIFT
Definition: RigDef_File.h:378
RigDef::Keyword::EXHAUSTS
@ EXHAUSTS
RigDef::Animation::SOURCE_SPEEDO
static const BitMask64_t SOURCE_SPEEDO
Definition: RigDef_File.h:372
RigDef::Prop::BeaconSpecial::color
Ogre::ColourValue color
Definition: RigDef_File.h:984