RigsofRods
Soft-body Physics Simulation
RigDef_Parser.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2021 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 
26 
27 #pragma once
28 
29 #include "Console.h"
30 #include "RigDef_Prerequisites.h"
31 #include "RigDef_File.h"
33 
34 #include <memory>
35 #include <string>
36 #include <regex>
37 
38 namespace RigDef
39 {
40 
56 class Parser
57 {
58 
59 public:
60 
61  static const int LINE_BUFFER_LENGTH = 2000;
62  static const int LINE_MAX_ARGS = 100;
63 
64  struct Token
65  {
66  const char* start;
67  int length;
68  };
69 
70  Parser();
71 
72  void Prepare();
73  void Finalize();
74  void ProcessOgreStream(Ogre::DataStream* stream, Ogre::String resource_group);
75  void ProcessRawLine(const char* line);
76 
78  {
79  return m_definition;
80  }
81 
83 
84  // Common for truckfiles and addonparts:
85  static void ProcessForsetLine(RigDef::Flexbody& def, const std::string& line, int line_number = -1);
86  static Keyword IdentifyKeyword(const std::string& line);
87  static SpecialProp IdentifySpecialProp(const std::string& str);
88 
89 private:
90 
91 // --------------------------------------------------------------------------
92 // Directive parsers
93 // --------------------------------------------------------------------------
94 
101  void ParseDirectiveForset();
103  void ParseDirectiveSection();
111  void ParseDirectiveSubmesh();
112 
113 // --------------------------------------------------------------------------
114 // Section parsers
115 // --------------------------------------------------------------------------
116 
117  void ParseAirbrakes();
118  void ParseAnimator();
119  void ParseAntiLockBrakes();
120  void ParseAssetpacks();
121  void ParseAuthor();
122  void ParseAxles();
123  void ParseBeams();
124  void ParseBrakes();
125  void ParseCab();
126  void ParseCameras();
127  void ParseCameraRails();
128  void ParseCinecam();
129  void ParseCollisionBox();
130  void ParseCommandsUnified();
131  void ParseContacter();
132  void ParseCruiseControl();
133  void ParseDescription();
134  void ParseEngine();
135  void ParseEngoption();
136  void ParseEngturbo();
137  void ParseExhaust();
138  void ParseExtCamera();
139  void ParseFileFormatVersion();
140  void ParseFileinfo();
141  void ParseFixes();
142  void ParseFlaresUnified();
143  void ParseFlares3();
144  void ParseFlexbody();
145  void ParseFlexBodyWheel();
146  void ParseFusedrag();
147  void ParseGlobals();
148  void ParseGuid();
149  void ParseGuiSettings();
150  void ParseHelp();
151  void ParseHook();
152  void ParseHydros();
153  void ParseInterAxles();
154  void ParseLockgroups();
155  void ParseManagedMaterials();
157  void ParseMeshWheel();
158  void ParseMeshWheel2();
159  void ParseMinimass();
160  void ParseNodesUnified();
161  void ParseParticles();
162  void ParsePistonprops();
163  void ParseProps();
164  void ParseRailGroups();
165  void ParseRopables();
166  void ParseRopes();
167  void ParseRotatorsUnified();
168  void ParseScrewprops();
169  void ParseScripts();
170  void ParseSetCollisionRange();
172  void ParseShock();
173  void ParseShock2();
174  void ParseShock3();
175  void ParseSlidenodes();
176  void ParseSoundsources();
177  void ParseSoundsources2();
178  void ParseSpeedLimiter();
180  void ParseTexcoords();
181  void ParseTies();
182  void ParseTorqueCurve();
183  void ParseTractionControl();
184  void ParseTransferCase();
185  void ParseTriggers();
186  void ParseTurbojets();
187  void ParseTurbopropsUnified();
188  void ParseVideoCamera();
189  void ParseWheelDetachers();
190  void ParseWheel();
191  void ParseWheel2();
192  void ParseWing();
193 
194 // --------------------------------------------------------------------------
195 // Utilities
196 // --------------------------------------------------------------------------
197 
198  void ProcessCurrentLine();
199  int TokenizeCurrentLine();
200  bool CheckNumArguments(int num_required_args);
203 
204  std::string GetArgStr (int index);
205  int GetArgInt (int index);
206  unsigned GetArgUint (int index);
207  long GetArgLong (int index);
208  float GetArgFloat (int index);
209  char GetArgChar (int index);
210  bool GetArgBool (int index);
211  WheelPropulsion GetArgPropulsion (int index);
212  WheelBraking GetArgBraking (int index);
213  Node::Ref GetArgNodeRef (int index);
214  Node::Ref GetArgRigidityNode (int index);
215  Node::Ref GetArgNullableNode (int index);
216  RoR::WheelSide GetArgWheelSide (int index);
218  RoR::FlareType GetArgFlareType (int index);
220  std::string GetArgManagedTex (int index);
222  BitMask_t GetArgCabOptions (int index);
223  BitMask_t GetArgTriggerOptions(int index);
224  BitMask_t GetArgBeamOptions (int index);
225  BitMask_t GetArgHydroOptions (int index);
226  BitMask_t GetArgShockOptions (int index);
227  BitMask_t GetArgShock2Options(int index);
228  BitMask_t GetArgShock3Options(int index);
229  BitMask_t GetArgNodeOptions (int index);
230  EngineType GetArgEngineType (int index);
232 
233  float ParseArgFloat (const char* str);
234  int ParseArgInt (const char* str);
235  unsigned ParseArgUint (const char* str);
236  unsigned ParseArgUint (const std::string& s);
237  float ParseArgFloat (const std::string& s);
238 
240  void LogMessage(RoR::Console::MessageType type, std::string const& msg);
241 
242  static void _TrimTrailingComments(std::string const & line_in, std::string & line_out);
243 
244  Node::Ref _ParseNodeRef(std::string const & node_id_str);
245  void _ParseDifferentialTypes(DifferentialTypeVec& diff_types, std::string const& options_str);
246  void _ParseBaseMeshWheel(BaseMeshWheel& mesh_wheel);
247 
248  void ParseOptionalInertia(Inertia& inertia, int index);
249 
250 // --------------------------------------------------------------------------
251 
252  // RoR defaults
253 
254  std::shared_ptr<Inertia> m_ror_default_inertia;
255  std::shared_ptr<NodeDefaults> m_ror_node_defaults;
256 
257  // Data from user directives
258  // Each affected section-struct has a shared_ptr to it's respective defaults
259  std::shared_ptr<Inertia> m_user_default_inertia;
260  std::shared_ptr<BeamDefaults> m_user_beam_defaults;
261  std::shared_ptr<NodeDefaults> m_user_node_defaults;
262  std::shared_ptr<DefaultMinimass> m_set_default_minimass;
265 
266  // Parser state
267  std::shared_ptr<Document::Module> m_root_module;
268  std::shared_ptr<Document::Module> m_current_module;
269 
270  unsigned int m_current_line_number;
277  std::shared_ptr<Submesh> m_current_submesh;
278  std::shared_ptr<CameraRail> m_current_camera_rail;
279 
281 
282  Ogre::String m_filename; // Logging
283  Ogre::String m_resource_group;
284 
286 };
287 
288 } // namespace RigDef
RigDef::Parser::ParseWheel2
void ParseWheel2()
Definition: RigDef_Parser.cpp:353
RigDef::Parser::Token
Definition: RigDef_Parser.h:64
RigDef::Parser::ParseDirectiveSectionConfig
void ParseDirectiveSectionConfig()
Definition: RigDef_Parser.cpp:2819
RigDef::MinimassOption
MinimassOption
Definition: RigDef_File.h:235
RigDef::Parser::m_num_args
int m_num_args
Number of tokens on current line.
Definition: RigDef_Parser.h:273
RigDef::Parser::BeginBlock
void BeginBlock(RigDef::Keyword keyword)
Definition: RigDef_Parser.cpp:2732
RigDef::Parser::ParseAntiLockBrakes
void ParseAntiLockBrakes()
Definition: RigDef_Parser.cpp:1268
RigDef::Parser::LINE_MAX_ARGS
static const int LINE_MAX_ARGS
Definition: RigDef_Parser.h:62
RigDef::Parser::Token::length
int length
Definition: RigDef_Parser.h:67
RigDef::Parser::GetArgLong
long GetArgLong(int index)
Definition: RigDef_Parser.cpp:2860
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::Parser::ParseTransferCase
void ParseTransferCase()
Definition: RigDef_Parser.cpp:476
RigDef::Parser::ParseCab
void ParseCab()
Definition: RigDef_Parser.cpp:826
RigDef::Parser::m_root_module
std::shared_ptr< Document::Module > m_root_module
Definition: RigDef_Parser.h:267
RigDef::SpecialProp
SpecialProp
Definition: RigDef_File.h:190
RigDef::Parser::ParseDirectiveSetBeamDefaultsScale
void ParseDirectiveSetBeamDefaultsScale()
Definition: RigDef_Parser.cpp:554
RigDef::Parser::ParseExtCamera
void ParseExtCamera()
Definition: RigDef_Parser.cpp:1016
RigDef::Parser::ParseExhaust
void ParseExhaust()
Definition: RigDef_Parser.cpp:1027
RigDef::Parser::ParseDirectiveSetBeamDefaults
void ParseDirectiveSetBeamDefaults()
Definition: RigDef_Parser.cpp:568
RigDef::Parser::ParseFlaresUnified
void ParseFlaresUnified()
Definition: RigDef_Parser.cpp:940
RigDef::Parser::CheckNumArguments
bool CheckNumArguments(int num_required_args)
Definition: RigDef_Parser.cpp:309
RigDef::Parser::ParseDirectiveDefaultSkin
void ParseDirectiveDefaultSkin()
Definition: RigDef_Parser.cpp:1052
RigDef::Parser::m_current_line_number
unsigned int m_current_line_number
Definition: RigDef_Parser.h:270
RigDef::Parser::ParseDirectiveBackmesh
void ParseDirectiveBackmesh()
Definition: RigDef_Parser.cpp:623
RigDef::Parser::ParseRopes
void ParseRopes()
Definition: RigDef_Parser.cpp:2181
RigDef::Parser::ParseRailGroups
void ParseRailGroups()
Definition: RigDef_Parser.cpp:2209
RigDef_Prerequisites.h
RigDef::Parser::ParseHydros
void ParseHydros()
Definition: RigDef_Parser.cpp:2488
RigDef::Parser::GetFile
RigDef::DocumentPtr GetFile()
Definition: RigDef_Parser.h:77
RigDef::Parser::GetSequentialImporter
SequentialImporter * GetSequentialImporter()
Definition: RigDef_Parser.h:82
RigDef::Parser::Finalize
void Finalize()
Definition: RigDef_Parser.cpp:2824
RigDef::Parser::ParseTies
void ParseTies()
Definition: RigDef_Parser.cpp:1802
RigDef::Parser::Token::start
const char * start
Definition: RigDef_Parser.h:66
RigDef::Parser::ParseGlobals
void ParseGlobals()
Definition: RigDef_Parser.cpp:772
RigDef::Parser::ParseTurbopropsUnified
void ParseTurbopropsUnified()
Definition: RigDef_Parser.cpp:1708
RigDef::Parser::m_ror_node_defaults
std::shared_ptr< NodeDefaults > m_ror_node_defaults
Definition: RigDef_Parser.h:255
RigDef::Parser::ParseScripts
void ParseScripts()
Definition: RigDef_Parser.cpp:2106
RigDef::Parser::ParseCameras
void ParseCameras()
Definition: RigDef_Parser.cpp:1696
RigDef::Parser::ParseTractionControl
void ParseTractionControl()
Definition: RigDef_Parser.cpp:430
RigDef::Parser::ParseDirectiveSetNodeDefaults
void ParseDirectiveSetNodeDefaults()
Definition: RigDef_Parser.cpp:527
RigDef::Parser::GetArgTriggerOptions
BitMask_t GetArgTriggerOptions(int index)
Definition: RigDef_Parser.cpp:3115
RigDef::Parser::GetArgExtCameraMode
RoR::ExtCameraMode GetArgExtCameraMode(int index)
Definition: RigDef_Parser.cpp:2983
RigDef::Parser::ParseFixes
void ParseFixes()
Definition: RigDef_Parser.cpp:1011
RigDef::Parser::ParseCinecam
void ParseCinecam()
Definition: RigDef_Parser.cpp:1516
RigDef::Parser
Checks the rig-def file syntax and pulls data to File object.
Definition: RigDef_Parser.h:56
RigDef::Parser::m_definition
RigDef::DocumentPtr m_definition
Definition: RigDef_Parser.h:285
RigDef::Parser::ParseDirectiveFlexbodyCameraMode
void ParseDirectiveFlexbodyCameraMode()
Definition: RigDef_Parser.cpp:812
RigDef::Parser::m_sequential_importer
SequentialImporter m_sequential_importer
Definition: RigDef_Parser.h:280
RigDef::Parser::ParseScrewprops
void ParseScrewprops()
Definition: RigDef_Parser.cpp:2092
RigDef::Parser::LINE_BUFFER_LENGTH
static const int LINE_BUFFER_LENGTH
Definition: RigDef_Parser.h:61
Console.h
RigDef::Parser::ParseFlares3
void ParseFlares3()
Definition: RigDef_Parser.cpp:978
RigDef::Parser::GetArgShock3Options
BitMask_t GetArgShock3Options(int index)
Definition: RigDef_Parser.cpp:3248
RigDef::Parser::GetArgChar
char GetArgChar(int index)
Definition: RigDef_Parser.cpp:2839
RigDef::Parser::GetArgNullableNode
Node::Ref GetArgNullableNode(int index)
Definition: RigDef_Parser.cpp:2941
RoR::FlareType
FlareType
Definition: SimData.h:229
RigDef::Parser::ParseMeshWheel2
void ParseMeshWheel2()
Definition: RigDef_Parser.cpp:691
RigDef::Parser::ParseRotatorsUnified
void ParseRotatorsUnified()
Definition: RigDef_Parser.cpp:2117
RigDef::Parser::m_ror_default_inertia
std::shared_ptr< Inertia > m_ror_default_inertia
Definition: RigDef_Parser.h:254
RigDef::Parser::m_set_default_minimass
std::shared_ptr< DefaultMinimass > m_set_default_minimass
Definition: RigDef_Parser.h:262
RigDef::Parser::ParseContacter
void ParseContacter()
Definition: RigDef_Parser.cpp:1396
RigDef::Parser::_TrimTrailingComments
static void _TrimTrailingComments(std::string const &line_in, std::string &line_out)
Definition: RigDef_Parser.cpp:2299
RigDef::Parser::ParseTriggers
void ParseTriggers()
Definition: RigDef_Parser.cpp:1756
RigDef::Parser::ParseCruiseControl
void ParseCruiseControl()
Definition: RigDef_Parser.cpp:1077
RigDef::Parser::ParseWheel
void ParseWheel()
Definition: RigDef_Parser.cpp:387
RigDef::Parser::GetArgBeamOptions
BitMask_t GetArgBeamOptions(int index)
Definition: RigDef_Parser.cpp:3142
RigDef::WheelPropulsion
WheelPropulsion
Definition: RigDef_File.h:250
RigDef::ManagedMaterialType
ManagedMaterialType
Definition: RigDef_File.h:206
RigDef::Parser::GetArgInt
int GetArgInt(int index)
Definition: RigDef_Parser.cpp:2885
RigDef::Parser::ProcessRawLine
void ProcessRawLine(const char *line)
Definition: RigDef_Parser.cpp:3402
RigDef::WingControlSurface
WingControlSurface
Definition: RigDef_File.h:257
RigDef::Parser::GetArgRigidityNode
Node::Ref GetArgRigidityNode(int index)
Definition: RigDef_Parser.cpp:2890
RigDef::Parser::m_log_keyword
Keyword m_log_keyword
Definition: RigDef_Parser.h:275
RigDef::Parser::ParseSpeedLimiter
void ParseSpeedLimiter()
Definition: RigDef_Parser.cpp:498
RigDef::Parser::ProcessOgreStream
void ProcessOgreStream(Ogre::DataStream *stream, Ogre::String resource_group)
Definition: RigDef_Parser.cpp:3379
RigDef::Parser::ParseInterAxles
void ParseInterAxles()
Definition: RigDef_Parser.cpp:1605
RigDef::Parser::ParseArgUint
unsigned ParseArgUint(const char *str)
Definition: RigDef_Parser.cpp:3010
RigDef::Parser::IdentifyKeyword
static Keyword IdentifyKeyword(const std::string &line)
Definition: RigDef_Parser.cpp:2686
RigDef::Parser::ParsePistonprops
void ParsePistonprops()
Definition: RigDef_Parser.cpp:2266
RigDef::Parser::ParseGuiSettings
void ParseGuiSettings()
Definition: RigDef_Parser.cpp:751
RigDef::Parser::Parser
Parser()
Definition: RigDef_Parser.cpp:69
RigDef::Parser::GetArgFlareType
RoR::FlareType GetArgFlareType(int index)
Definition: RigDef_Parser.cpp:2955
RigDef::Parser::ParseWheelDetachers
void ParseWheelDetachers()
Definition: RigDef_Parser.cpp:418
RigDef::Parser::ParseOptionalInertia
void ParseOptionalInertia(Inertia &inertia, int index)
Definition: RigDef_Parser.cpp:2513
RigDef::Parser::m_current_managed_material_options
ManagedMaterialsOptions m_current_managed_material_options
Definition: RigDef_Parser.h:264
RigDef::Parser::GetArgHydroOptions
BitMask_t GetArgHydroOptions(int index)
Definition: RigDef_Parser.cpp:3163
RigDef::Parser::_ParseBaseMeshWheel
void _ParseBaseMeshWheel(BaseMeshWheel &mesh_wheel)
Definition: RigDef_Parser.cpp:653
RoR::ExtCameraMode
ExtCameraMode
Definition: SimData.h:57
RigDef::Parser::GetArgShock2Options
BitMask_t GetArgShock2Options(int index)
Definition: RigDef_Parser.cpp:3225
RigDef::Parser::ParseArgFloat
float ParseArgFloat(const char *str)
Definition: RigDef_Parser.cpp:3000
RigDef::Parser::ParseAirbrakes
void ParseAirbrakes()
Definition: RigDef_Parser.cpp:1631
keyword
static int keyword
Definition: Bench_TruckParser_IdentifyKeyword.cpp:1448
RigDef::Parser::m_any_named_node_defined
bool m_any_named_node_defined
Parser state.
Definition: RigDef_Parser.h:276
RigDef::Parser::IdentifySpecialProp
static SpecialProp IdentifySpecialProp(const std::string &str)
Definition: RigDef_Parser.cpp:3299
RigDef::Parser::ParseDirectiveSetDefaultMinimass
void ParseDirectiveSetDefaultMinimass()
Definition: RigDef_Parser.cpp:2059
RigDef
Definition: RigDef_File.cpp:32
RigDef::Keyword
Keyword
Definition: RigDef_File.h:65
RigDef::Parser::LogMessage
void LogMessage(RoR::Console::MessageType type, std::string const &msg)
Adds a message to console.
Definition: RigDef_Parser.cpp:2677
RigDef::Parser::m_current_camera_rail
std::shared_ptr< CameraRail > m_current_camera_rail
Parser state.
Definition: RigDef_Parser.h:278
RigDef::Parser::ParseLockgroups
void ParseLockgroups()
Definition: RigDef_Parser.cpp:2473
RigDef::Parser::ParseFusedrag
void ParseFusedrag()
Definition: RigDef_Parser.cpp:785
RoR::Console::MessageType
MessageType
Definition: Console.h:46
RigDef::Parser::ParseBeams
void ParseBeams()
Definition: RigDef_Parser.cpp:2542
RigDef::Parser::ParseWing
void ParseWing()
Definition: RigDef_Parser.cpp:324
RigDef::Parser::_ParseNodeRef
Node::Ref _ParseNodeRef(std::string const &node_id_str)
Definition: RigDef_Parser.cpp:2032
RigDef::SequentialImporter
Definition: RigDef_SequentialImporter.h:77
RigDef::Parser::ParseDirectiveSetInertiaDefaults
void ParseDirectiveSetInertiaDefaults()
Definition: RigDef_Parser.cpp:2067
RigDef::Parser::ParseBrakes
void ParseBrakes()
Definition: RigDef_Parser.cpp:1561
RigDef::Parser::ParseAssetpacks
void ParseAssetpacks()
Definition: RigDef_Parser.cpp:1654
RigDef_SequentialImporter.h
RigDef::Parser::GetArgBool
bool GetArgBool(int index)
Definition: RigDef_Parser.cpp:3033
RigDef::Parser::ParseDirectiveDetacherGroup
void ParseDirectiveDetacherGroup()
Definition: RigDef_Parser.cpp:1063
RigDef::Parser::ParseFlexBodyWheel
void ParseFlexBodyWheel()
Definition: RigDef_Parser.cpp:2395
RigDef::Parser::ProcessGlobalDirective
void ProcessGlobalDirective(Keyword keyword)
Directives that should only appear in root module.
Definition: RigDef_Parser.cpp:635
RigDef::Parser::m_user_beam_defaults
std::shared_ptr< BeamDefaults > m_user_beam_defaults
Definition: RigDef_Parser.h:260
RigDef::Parser::ProcessChangeModuleLine
void ProcessChangeModuleLine(Keyword keyword)
Definition: RigDef_Parser.cpp:2765
RigDef::Parser::ParseRopables
void ParseRopables()
Definition: RigDef_Parser.cpp:2196
RigDef::Parser::m_current_detacher_group
int m_current_detacher_group
Definition: RigDef_Parser.h:263
RigDef::Parser::ParseAxles
void ParseAxles()
Definition: RigDef_Parser.cpp:1574
RigDef::Parser::Prepare
void Prepare()
Definition: RigDef_Parser.cpp:2707
RigDef::Keyword::INVALID
@ INVALID
RigDef::Parser::ParseCameraRails
void ParseCameraRails()
Definition: RigDef_Parser.cpp:1556
RigDef::Inertia
Definition: RigDef_File.h:441
RigDef::BaseMeshWheel
Definition: RigDef_File.h:422
RigDef::Parser::ParseEngturbo
void ParseEngturbo()
Definition: RigDef_Parser.cpp:1334
RigDef::Parser::m_user_default_inertia
std::shared_ptr< Inertia > m_user_default_inertia
Definition: RigDef_Parser.h:259
RigDef::Parser::GetArgMinimassOption
MinimassOption GetArgMinimassOption(int index)
Definition: RigDef_Parser.cpp:3073
RigDef::Parser::m_user_node_defaults
std::shared_ptr< NodeDefaults > m_user_node_defaults
Definition: RigDef_Parser.h:261
RigDef::Parser::GetArgManagedTex
std::string GetArgManagedTex(int index)
Definition: RigDef_Parser.cpp:3067
RigDef::Parser::ParseSoundsources
void ParseSoundsources()
Definition: RigDef_Parser.cpp:1848
RigDef::Parser::m_current_line
char m_current_line[LINE_BUFFER_LENGTH]
Definition: RigDef_Parser.h:271
RigDef::Parser::ParseAuthor
void ParseAuthor()
Definition: RigDef_Parser.cpp:2659
RigDef::Parser::GetArgShockOptions
BitMask_t GetArgShockOptions(int index)
Definition: RigDef_Parser.cpp:3202
RigDef::Parser::_ParseDifferentialTypes
void _ParseDifferentialTypes(DifferentialTypeVec &diff_types, std::string const &options_str)
Definition: RigDef_Parser.cpp:2521
RigDef::Parser::ParseGuid
void ParseGuid()
Definition: RigDef_Parser.cpp:762
RigDef::Parser::ParseCommandsUnified
void ParseCommandsUnified()
Definition: RigDef_Parser.cpp:1403
RigDef::Parser::ParseDirectiveSubmesh
void ParseDirectiveSubmesh()
Definition: RigDef_Parser.cpp:617
RigDef::Parser::GetArgFloat
float GetArgFloat(int index)
Definition: RigDef_Parser.cpp:2995
RigDef::Parser::ParseAnimator
void ParseAnimator()
Definition: RigDef_Parser.cpp:2569
RigDef::Parser::ParseShock3
void ParseShock3()
Definition: RigDef_Parser.cpp:1956
RigDef::Flexbody
Definition: RigDef_File.h:895
RigDef::Parser::ParseFileinfo
void ParseFileinfo()
Definition: RigDef_Parser.cpp:2164
RigDef::Parser::ParseEngine
void ParseEngine()
Definition: RigDef_Parser.cpp:1364
RigDef::Parser::ParseHelp
void ParseHelp()
Definition: RigDef_Parser.cpp:744
RigDef::Parser::ProcessForsetLine
static void ProcessForsetLine(RigDef::Flexbody &def, const std::string &line, int line_number=-1)
Definition: RigDef_Parser.cpp:893
RigDef::Parser::ParseMinimass
void ParseMinimass()
Definition: RigDef_Parser.cpp:2383
RigDef::Parser::ParseFileFormatVersion
void ParseFileFormatVersion()
Definition: RigDef_Parser.cpp:1041
RigDef::Parser::m_current_submesh
std::shared_ptr< Submesh > m_current_submesh
Parser state.
Definition: RigDef_Parser.h:277
RigDef::Parser::ParseProps
void ParseProps()
Definition: RigDef_Parser.cpp:2226
RigDef::Parser::ParseDirectiveAddAnimation
void ParseDirectiveAddAnimation()
Definition: RigDef_Parser.cpp:1093
RigDef::Parser::m_args
Token m_args[LINE_MAX_ARGS]
Tokens of current line.
Definition: RigDef_Parser.h:272
RigDef::Parser::ParseSetCollisionRange
void ParseSetCollisionRange()
Definition: RigDef_Parser.cpp:343
RigDef::Parser::ParseDescription
void ParseDescription()
Definition: RigDef_Parser.cpp:1088
RigDef::Parser::ParseMeshWheel
void ParseMeshWheel()
Definition: RigDef_Parser.cpp:676
RigDef::Parser::ParseDirectivePropCameraMode
void ParseDirectivePropCameraMode()
Definition: RigDef_Parser.cpp:603
RigDef::Parser::ParseMaterialFlareBindings
void ParseMaterialFlareBindings()
Definition: RigDef_Parser.cpp:2431
RigDef::Parser::ParseTexcoords
void ParseTexcoords()
Definition: RigDef_Parser.cpp:845
RigDef::Parser::ParseFlexbody
void ParseFlexbody()
Definition: RigDef_Parser.cpp:863
RigDef::Parser::GetArgWheelSide
RoR::WheelSide GetArgWheelSide(int index)
Definition: RigDef_Parser.cpp:2844
RigDef::Parser::ParseShock
void ParseShock()
Definition: RigDef_Parser.cpp:2012
RigDef::Parser::m_filename
Ogre::String m_filename
Definition: RigDef_Parser.h:282
RigDef::Parser::ParseDirectiveSetManagedMaterialsOptions
void ParseDirectiveSetManagedMaterialsOptions()
Definition: RigDef_Parser.cpp:546
RigDef::Parser::ParseHook
void ParseHook()
Definition: RigDef_Parser.cpp:706
RigDef::Parser::GetArgBraking
WheelBraking GetArgBraking(int index)
Definition: RigDef_Parser.cpp:2917
RigDef::Parser::ParseSubmeshGroundModel
void ParseSubmeshGroundModel()
Definition: RigDef_Parser.cpp:491
RigDef::Parser::ParseCollisionBox
void ParseCollisionBox()
Definition: RigDef_Parser.cpp:1502
RigDef::Parser::ParseSetSkeletonSettings
void ParseSetSkeletonSettings()
Definition: RigDef_Parser.cpp:509
BitMask_t
uint32_t BitMask_t
Definition: BitFlags.h:7
RigDef::Parser::ParseSoundsources2
void ParseSoundsources2()
Definition: RigDef_Parser.cpp:1859
RigDef::Parser::ParseDirectiveForset
void ParseDirectiveForset()
Definition: RigDef_Parser.cpp:882
RigDef::Parser::ParseEngoption
void ParseEngoption()
Definition: RigDef_Parser.cpp:1313
RigDef::EngineType
EngineType
Definition: RigDef_File.h:218
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: RigDef_Prerequisites.h:38
RigDef::Parser::GetArgManagedMatType
ManagedMaterialType GetArgManagedMatType(int index)
Definition: RigDef_Parser.cpp:3331
RigDef::Parser::GetArgNodeRef
Node::Ref GetArgNodeRef(int index)
Definition: RigDef_Parser.cpp:2936
RoR::WheelSide
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
Definition: GfxData.h:115
RigDef::Parser::GetArgUint
unsigned GetArgUint(int index)
Definition: RigDef_Parser.cpp:2950
RigDef::Parser::m_resource_group
Ogre::String m_resource_group
Definition: RigDef_Parser.h:283
RigDef::Parser::ParseVideoCamera
void ParseVideoCamera()
Definition: RigDef_Parser.cpp:1665
RigDef::Parser::GetArgNodeOptions
BitMask_t GetArgNodeOptions(int index)
Definition: RigDef_Parser.cpp:3270
RigDef::Parser::GetArgWingSurface
WingControlSurface GetArgWingSurface(int index)
Definition: RigDef_Parser.cpp:3038
RigDef::Parser::GetArgStr
std::string GetArgStr(int index)
Definition: RigDef_Parser.cpp:2834
RigDef::Parser::ParseTorqueCurve
void ParseTorqueCurve()
Definition: RigDef_Parser.cpp:1775
RigDef::Parser::ParseNodesUnified
void ParseNodesUnified()
Definition: RigDef_Parser.cpp:2329
RigDef::Parser::m_current_module
std::shared_ptr< Document::Module > m_current_module
Definition: RigDef_Parser.h:268
RigDef::Parser::ProcessCurrentLine
void ProcessCurrentLine()
Definition: RigDef_Parser.cpp:76
RigDef::Parser::ParseTurbojets
void ParseTurbojets()
Definition: RigDef_Parser.cpp:1738
RigDef::Parser::GetArgPropulsion
WheelPropulsion GetArgPropulsion(int index)
Definition: RigDef_Parser.cpp:2900
RigDef::Parser::ParseParticles
void ParseParticles()
Definition: RigDef_Parser.cpp:2286
RigDef::WheelBraking
WheelBraking
Definition: RigDef_File.h:241
RigDef::Parser::ParseArgInt
int ParseArgInt(const char *str)
Definition: RigDef_Parser.cpp:3028
RigDef_File.h
Data structures representing 'truck' file format, see https://docs.rigsofrods.org/vehicle-creation/fi...
RigDef::Parser::m_current_block
Keyword m_current_block
Definition: RigDef_Parser.h:274
RigDef::Parser::ParseShock2
void ParseShock2()
Definition: RigDef_Parser.cpp:1985
RigDef::ManagedMaterialsOptions
Definition: RigDef_File.h:1016
RigDef::Parser::ParseSlidenodes
void ParseSlidenodes()
Definition: RigDef_Parser.cpp:1878
RigDef::DifferentialTypeVec
std::vector< DifferentialType > DifferentialTypeVec
Definition: RigDef_File.h:233
RigDef::Parser::GetArgEngineType
EngineType GetArgEngineType(int index)
Definition: RigDef_Parser.cpp:3315
RigDef::Parser::ParseDirectiveSection
void ParseDirectiveSection()
Definition: RigDef_Parser.cpp:2814
RigDef::Parser::GetArgCabOptions
BitMask_t GetArgCabOptions(int index)
Definition: RigDef_Parser.cpp:3090
RigDef::Parser::ParseManagedMaterials
void ParseManagedMaterials()
Definition: RigDef_Parser.cpp:2442
RigDef::Parser::TokenizeCurrentLine
int TokenizeCurrentLine()
Definition: RigDef_Parser.cpp:3344