RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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();
145  void ParseFlexbody();
146  void ParseFlexBodyWheel();
147  void ParseFusedrag();
148  void ParseGlobals();
149  void ParseGuid();
150  void ParseGuiSettings();
151  void ParseHelp();
152  void ParseHook();
153  void ParseHydros();
154  void ParseInterAxles();
155  void ParseLockgroups();
156  void ParseManagedMaterials();
158  void ParseMeshWheel();
159  void ParseMeshWheel2();
160  void ParseMinimass();
161  void ParseNodesUnified();
162  void ParseParticles();
163  void ParsePistonprops();
164  void ParseProps();
165  void ParseRailGroups();
166  void ParseRopables();
167  void ParseRopes();
168  void ParseRotatorsUnified();
169  void ParseScrewprops();
170  void ParseScripts();
171  void ParseSetCollisionRange();
173  void ParseShock();
174  void ParseShock2();
175  void ParseShock3();
176  void ParseSlidenodes();
177  void ParseSoundsources();
178  void ParseSoundsources2();
179  void ParseSpeedLimiter();
181  void ParseTexcoords();
182  void ParseTies();
183  void ParseTorqueCurve();
184  void ParseTractionControl();
185  void ParseTransferCase();
186  void ParseTriggers();
187  void ParseTurbojets();
188  void ParseTurbopropsUnified();
189  void ParseVideoCamera();
190  void ParseWheelDetachers();
191  void ParseWheel();
192  void ParseWheel2();
193  void ParseWing();
194 
195 // --------------------------------------------------------------------------
196 // Utilities
197 // --------------------------------------------------------------------------
198 
199  void ProcessCurrentLine();
200  int TokenizeCurrentLine();
201  bool CheckNumArguments(int num_required_args);
204 
205  std::string GetArgStr (int index);
206  int GetArgInt (int index);
207  unsigned GetArgUint (int index);
208  long GetArgLong (int index);
209  float GetArgFloat (int index);
210  char GetArgChar (int index);
211  bool GetArgBool (int index);
212  WheelPropulsion GetArgPropulsion (int index);
213  WheelBraking GetArgBraking (int index);
214  Node::Ref GetArgNodeRef (int index);
215  Node::Ref GetArgRigidityNode (int index);
216  Node::Ref GetArgNullableNode (int index);
217  RoR::WheelSide GetArgWheelSide (int index);
219  RoR::FlareType GetArgFlareType (int index);
221  std::string GetArgManagedTex (int index);
223  BitMask_t GetArgCabOptions (int index);
224  BitMask_t GetArgTriggerOptions(int index);
225  BitMask_t GetArgBeamOptions (int index);
226  BitMask_t GetArgHydroOptions (int index);
227  BitMask_t GetArgShockOptions (int index);
228  BitMask_t GetArgShock2Options(int index);
229  BitMask_t GetArgShock3Options(int index);
230  BitMask_t GetArgNodeOptions (int index);
231  EngineType GetArgEngineType (int index);
234 
235  float ParseArgFloat (const char* str);
236  int ParseArgInt (const char* str);
237  unsigned ParseArgUint (const char* str);
238  unsigned ParseArgUint (const std::string& s);
239  float ParseArgFloat (const std::string& s);
240 
242  void LogMessage(RoR::Console::MessageType type, std::string const& msg);
243 
244  static void _TrimTrailingComments(std::string const & line_in, std::string & line_out);
245 
246  Node::Ref _ParseNodeRef(std::string const & node_id_str);
247  void _ParseDifferentialTypes(DifferentialTypeVec& diff_types, std::string const& options_str);
248  void _ParseBaseMeshWheel(BaseMeshWheel& mesh_wheel);
249 
250  void ParseOptionalInertia(Inertia& inertia, int index);
251 
252 // --------------------------------------------------------------------------
253 
254  // RoR defaults
255 
256  std::shared_ptr<Inertia> m_ror_default_inertia;
257  std::shared_ptr<NodeDefaults> m_ror_node_defaults;
258 
259  // Data from user directives
260  // Each affected section-struct has a shared_ptr to it's respective defaults
261  std::shared_ptr<Inertia> m_user_default_inertia;
262  std::shared_ptr<BeamDefaults> m_user_beam_defaults;
263  std::shared_ptr<NodeDefaults> m_user_node_defaults;
264  std::shared_ptr<DefaultMinimass> m_set_default_minimass;
267 
268  // Parser state
269  std::shared_ptr<Document::Module> m_root_module;
270  std::shared_ptr<Document::Module> m_current_module;
271 
272  unsigned int m_current_line_number;
279  std::shared_ptr<Submesh> m_current_submesh;
280  std::shared_ptr<CameraRail> m_current_camera_rail;
281 
283 
284  Ogre::String m_filename; // Logging
285  Ogre::String m_resource_group;
286 
288 };
289 
290 } // namespace RigDef
RigDef::Parser::ParseWheel2
void ParseWheel2()
Definition: RigDef_Parser.cpp:354
RigDef::Parser::Token
Definition: RigDef_Parser.h:64
RigDef::Parser::ParseDirectiveSectionConfig
void ParseDirectiveSectionConfig()
Definition: RigDef_Parser.cpp:2845
RigDef::MinimassOption
MinimassOption
Definition: RigDef_File.h:236
RigDef::Parser::m_num_args
int m_num_args
Number of tokens on current line.
Definition: RigDef_Parser.h:275
RigDef::Parser::BeginBlock
void BeginBlock(RigDef::Keyword keyword)
Definition: RigDef_Parser.cpp:2758
RigDef::Parser::ParseAntiLockBrakes
void ParseAntiLockBrakes()
Definition: RigDef_Parser.cpp:1269
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:2886
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:477
RigDef::Parser::ParseCab
void ParseCab()
Definition: RigDef_Parser.cpp:827
RigDef::Parser::m_root_module
std::shared_ptr< Document::Module > m_root_module
Definition: RigDef_Parser.h:269
RigDef::SpecialProp
SpecialProp
Definition: RigDef_File.h:191
RigDef::Parser::ParseDirectiveSetBeamDefaultsScale
void ParseDirectiveSetBeamDefaultsScale()
Definition: RigDef_Parser.cpp:555
RigDef::Parser::ParseExtCamera
void ParseExtCamera()
Definition: RigDef_Parser.cpp:1017
RigDef::Parser::ParseExhaust
void ParseExhaust()
Definition: RigDef_Parser.cpp:1028
RigDef::Parser::ParseDirectiveSetBeamDefaults
void ParseDirectiveSetBeamDefaults()
Definition: RigDef_Parser.cpp:569
RigDef::Parser::ParseFlaresUnified
void ParseFlaresUnified()
Definition: RigDef_Parser.cpp:941
RigDef::Parser::CheckNumArguments
bool CheckNumArguments(int num_required_args)
Definition: RigDef_Parser.cpp:310
RigDef::Parser::ParseDirectiveDefaultSkin
void ParseDirectiveDefaultSkin()
Definition: RigDef_Parser.cpp:1053
RigDef::Parser::m_current_line_number
unsigned int m_current_line_number
Definition: RigDef_Parser.h:272
RigDef::Parser::ParseDirectiveBackmesh
void ParseDirectiveBackmesh()
Definition: RigDef_Parser.cpp:624
RigDef::Parser::ParseRopes
void ParseRopes()
Definition: RigDef_Parser.cpp:2207
RigDef::Parser::ParseRailGroups
void ParseRailGroups()
Definition: RigDef_Parser.cpp:2235
RigDef_Prerequisites.h
RigDef::Parser::ParseHydros
void ParseHydros()
Definition: RigDef_Parser.cpp:2514
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:2850
RigDef::Parser::ParseTies
void ParseTies()
Definition: RigDef_Parser.cpp:1803
RigDef::Parser::Token::start
const char * start
Definition: RigDef_Parser.h:66
RigDef::Parser::ParseGlobals
void ParseGlobals()
Definition: RigDef_Parser.cpp:773
RigDef::Parser::ParseTurbopropsUnified
void ParseTurbopropsUnified()
Definition: RigDef_Parser.cpp:1709
RigDef::Parser::m_ror_node_defaults
std::shared_ptr< NodeDefaults > m_ror_node_defaults
Definition: RigDef_Parser.h:257
RigDef::Parser::ParseScripts
void ParseScripts()
Definition: RigDef_Parser.cpp:2132
RigDef::Parser::ParseCameras
void ParseCameras()
Definition: RigDef_Parser.cpp:1697
RigDef::Parser::ParseTractionControl
void ParseTractionControl()
Definition: RigDef_Parser.cpp:431
RigDef::Parser::ParseDirectiveSetNodeDefaults
void ParseDirectiveSetNodeDefaults()
Definition: RigDef_Parser.cpp:528
RigDef::Parser::GetArgTriggerOptions
BitMask_t GetArgTriggerOptions(int index)
Definition: RigDef_Parser.cpp:3141
RigDef::Parser::GetArgExtCameraMode
RoR::ExtCameraMode GetArgExtCameraMode(int index)
Definition: RigDef_Parser.cpp:3009
RigDef::Parser::ParseFixes
void ParseFixes()
Definition: RigDef_Parser.cpp:1012
RigDef::Parser::ParseCinecam
void ParseCinecam()
Definition: RigDef_Parser.cpp:1517
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:287
RigDef::Parser::ParseDirectiveFlexbodyCameraMode
void ParseDirectiveFlexbodyCameraMode()
Definition: RigDef_Parser.cpp:813
RigDef::Parser::m_sequential_importer
SequentialImporter m_sequential_importer
Definition: RigDef_Parser.h:282
RigDef::Parser::ParseScrewprops
void ParseScrewprops()
Definition: RigDef_Parser.cpp:2118
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:979
RigDef::Parser::GetArgShock3Options
BitMask_t GetArgShock3Options(int index)
Definition: RigDef_Parser.cpp:3274
RigDef::Parser::GetArgChar
char GetArgChar(int index)
Definition: RigDef_Parser.cpp:2865
RigDef::Parser::GetArgNullableNode
Node::Ref GetArgNullableNode(int index)
Definition: RigDef_Parser.cpp:2967
RoR::FlareType
FlareType
Definition: SimData.h:228
RigDef::Parser::ParseMeshWheel2
void ParseMeshWheel2()
Definition: RigDef_Parser.cpp:692
RigDef::Parser::ParseRotatorsUnified
void ParseRotatorsUnified()
Definition: RigDef_Parser.cpp:2143
RigDef::Parser::m_ror_default_inertia
std::shared_ptr< Inertia > m_ror_default_inertia
Definition: RigDef_Parser.h:256
RigDef::Parser::m_set_default_minimass
std::shared_ptr< DefaultMinimass > m_set_default_minimass
Definition: RigDef_Parser.h:264
RigDef::Parser::ParseContacter
void ParseContacter()
Definition: RigDef_Parser.cpp:1397
RigDef::Parser::_TrimTrailingComments
static void _TrimTrailingComments(std::string const &line_in, std::string &line_out)
Definition: RigDef_Parser.cpp:2325
RigDef::Parser::ParseTriggers
void ParseTriggers()
Definition: RigDef_Parser.cpp:1757
RigDef::Parser::ParseCruiseControl
void ParseCruiseControl()
Definition: RigDef_Parser.cpp:1078
RigDef::Parser::ParseWheel
void ParseWheel()
Definition: RigDef_Parser.cpp:388
RigDef::Parser::GetArgBeamOptions
BitMask_t GetArgBeamOptions(int index)
Definition: RigDef_Parser.cpp:3168
RigDef::WheelPropulsion
WheelPropulsion
Definition: RigDef_File.h:251
RigDef::ManagedMaterialType
ManagedMaterialType
Definition: RigDef_File.h:207
RigDef::Parser::GetArgInt
int GetArgInt(int index)
Definition: RigDef_Parser.cpp:2911
RigDef::Parser::ProcessRawLine
void ProcessRawLine(const char *line)
Definition: RigDef_Parser.cpp:3444
RigDef::WingControlSurface
WingControlSurface
Definition: RigDef_File.h:258
RigDef::Parser::GetArgRigidityNode
Node::Ref GetArgRigidityNode(int index)
Definition: RigDef_Parser.cpp:2916
RigDef::Parser::m_log_keyword
Keyword m_log_keyword
Definition: RigDef_Parser.h:277
RigDef::Parser::ParseSpeedLimiter
void ParseSpeedLimiter()
Definition: RigDef_Parser.cpp:499
RigDef::Parser::ProcessOgreStream
void ProcessOgreStream(Ogre::DataStream *stream, Ogre::String resource_group)
Definition: RigDef_Parser.cpp:3421
RigDef::Parser::ParseInterAxles
void ParseInterAxles()
Definition: RigDef_Parser.cpp:1606
RigDef::Parser::ParseArgUint
unsigned ParseArgUint(const char *str)
Definition: RigDef_Parser.cpp:3036
RigDef::Parser::IdentifyKeyword
static Keyword IdentifyKeyword(const std::string &line)
Definition: RigDef_Parser.cpp:2712
RigDef::Parser::ParsePistonprops
void ParsePistonprops()
Definition: RigDef_Parser.cpp:2292
RigDef::Parser::ParseGuiSettings
void ParseGuiSettings()
Definition: RigDef_Parser.cpp:752
RigDef::Parser::Parser
Parser()
Definition: RigDef_Parser.cpp:69
RigDef::Parser::GetArgFlareType
RoR::FlareType GetArgFlareType(int index)
Definition: RigDef_Parser.cpp:2981
RigDef::Parser::ParseWheelDetachers
void ParseWheelDetachers()
Definition: RigDef_Parser.cpp:419
RigDef::Parser::ParseOptionalInertia
void ParseOptionalInertia(Inertia &inertia, int index)
Definition: RigDef_Parser.cpp:2539
RigDef::Parser::m_current_managed_material_options
ManagedMaterialsOptions m_current_managed_material_options
Definition: RigDef_Parser.h:266
RigDef::Parser::GetArgHydroOptions
BitMask_t GetArgHydroOptions(int index)
Definition: RigDef_Parser.cpp:3189
RigDef::Parser::_ParseBaseMeshWheel
void _ParseBaseMeshWheel(BaseMeshWheel &mesh_wheel)
Definition: RigDef_Parser.cpp:654
RoR::ExtCameraMode
ExtCameraMode
Definition: SimData.h:56
RigDef::Parser::GetArgShock2Options
BitMask_t GetArgShock2Options(int index)
Definition: RigDef_Parser.cpp:3251
RigDef::Parser::ParseArgFloat
float ParseArgFloat(const char *str)
Definition: RigDef_Parser.cpp:3026
RigDef::Parser::ParseAirbrakes
void ParseAirbrakes()
Definition: RigDef_Parser.cpp:1632
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:278
RigDef::Parser::IdentifySpecialProp
static SpecialProp IdentifySpecialProp(const std::string &str)
Definition: RigDef_Parser.cpp:3325
RigDef::Parser::ParseDirectiveSetDefaultMinimass
void ParseDirectiveSetDefaultMinimass()
Definition: RigDef_Parser.cpp:2060
RigDef
Definition: ForwardDeclarations.h:276
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:2703
RigDef::Parser::m_current_camera_rail
std::shared_ptr< CameraRail > m_current_camera_rail
Parser state.
Definition: RigDef_Parser.h:280
RigDef::Parser::ParseLockgroups
void ParseLockgroups()
Definition: RigDef_Parser.cpp:2499
RigDef::Parser::ParseFusedrag
void ParseFusedrag()
Definition: RigDef_Parser.cpp:786
RoR::Console::MessageType
MessageType
Definition: Console.h:46
RigDef::Parser::ParseBeams
void ParseBeams()
Definition: RigDef_Parser.cpp:2568
RigDef::Parser::ParseWing
void ParseWing()
Definition: RigDef_Parser.cpp:325
RigDef::Parser::_ParseNodeRef
Node::Ref _ParseNodeRef(std::string const &node_id_str)
Definition: RigDef_Parser.cpp:2033
RigDef::SequentialImporter
Definition: RigDef_SequentialImporter.h:77
RigDef::Parser::ParseDirectiveSetInertiaDefaults
void ParseDirectiveSetInertiaDefaults()
Definition: RigDef_Parser.cpp:2093
RigDef::Parser::ParseBrakes
void ParseBrakes()
Definition: RigDef_Parser.cpp:1562
RigDef::Parser::ParseAssetpacks
void ParseAssetpacks()
Definition: RigDef_Parser.cpp:1655
RigDef_SequentialImporter.h
RigDef::Parser::GetArgBool
bool GetArgBool(int index)
Definition: RigDef_Parser.cpp:3059
RigDef::Parser::ParseDirectiveDetacherGroup
void ParseDirectiveDetacherGroup()
Definition: RigDef_Parser.cpp:1064
RigDef::Parser::ParseFlexBodyWheel
void ParseFlexBodyWheel()
Definition: RigDef_Parser.cpp:2421
RigDef::Parser::ProcessGlobalDirective
void ProcessGlobalDirective(Keyword keyword)
Directives that should only appear in root module.
Definition: RigDef_Parser.cpp:636
RigDef::Parser::m_user_beam_defaults
std::shared_ptr< BeamDefaults > m_user_beam_defaults
Definition: RigDef_Parser.h:262
RigDef::Parser::ProcessChangeModuleLine
void ProcessChangeModuleLine(Keyword keyword)
Definition: RigDef_Parser.cpp:2791
RigDef::Parser::ParseRopables
void ParseRopables()
Definition: RigDef_Parser.cpp:2222
RigDef::Parser::m_current_detacher_group
int m_current_detacher_group
Definition: RigDef_Parser.h:265
RigDef::Parser::ParseAxles
void ParseAxles()
Definition: RigDef_Parser.cpp:1575
RigDef::Parser::Prepare
void Prepare()
Definition: RigDef_Parser.cpp:2733
RigDef::Keyword::INVALID
@ INVALID
RigDef::Parser::ParseCameraRails
void ParseCameraRails()
Definition: RigDef_Parser.cpp:1557
RigDef::Inertia
Definition: RigDef_File.h:442
RigDef::BaseMeshWheel
Definition: RigDef_File.h:423
RigDef::Parser::ParseEngturbo
void ParseEngturbo()
Definition: RigDef_Parser.cpp:1335
RigDef::Parser::m_user_default_inertia
std::shared_ptr< Inertia > m_user_default_inertia
Definition: RigDef_Parser.h:261
RigDef::Parser::GetArgMinimassOption
MinimassOption GetArgMinimassOption(int index)
Definition: RigDef_Parser.cpp:3099
RigDef::Parser::m_user_node_defaults
std::shared_ptr< NodeDefaults > m_user_node_defaults
Definition: RigDef_Parser.h:263
RigDef::Parser::GetArgManagedTex
std::string GetArgManagedTex(int index)
Definition: RigDef_Parser.cpp:3093
RigDef::Parser::ParseSoundsources
void ParseSoundsources()
Definition: RigDef_Parser.cpp:1849
RigDef::Parser::m_current_line
char m_current_line[LINE_BUFFER_LENGTH]
Definition: RigDef_Parser.h:273
RigDef::Parser::ParseAuthor
void ParseAuthor()
Definition: RigDef_Parser.cpp:2685
RigDef::Parser::GetArgShockOptions
BitMask_t GetArgShockOptions(int index)
Definition: RigDef_Parser.cpp:3228
RigDef::Parser::_ParseDifferentialTypes
void _ParseDifferentialTypes(DifferentialTypeVec &diff_types, std::string const &options_str)
Definition: RigDef_Parser.cpp:2547
RigDef::Parser::ParseGuid
void ParseGuid()
Definition: RigDef_Parser.cpp:763
RigDef::Parser::ParseCommandsUnified
void ParseCommandsUnified()
Definition: RigDef_Parser.cpp:1404
RigDef::Parser::ParseDirectiveSubmesh
void ParseDirectiveSubmesh()
Definition: RigDef_Parser.cpp:618
RigDef::Parser::GetArgFloat
float GetArgFloat(int index)
Definition: RigDef_Parser.cpp:3021
RigDef::Parser::ParseAnimator
void ParseAnimator()
Definition: RigDef_Parser.cpp:2595
RigDef::Parser::ParseShock3
void ParseShock3()
Definition: RigDef_Parser.cpp:1957
RigDef::Flexbody
Definition: RigDef_File.h:902
RigDef::Parser::ParseFileinfo
void ParseFileinfo()
Definition: RigDef_Parser.cpp:2190
RigDef::Parser::ParseEngine
void ParseEngine()
Definition: RigDef_Parser.cpp:1365
RigDef::Parser::ParseHelp
void ParseHelp()
Definition: RigDef_Parser.cpp:745
RigDef::Parser::ProcessForsetLine
static void ProcessForsetLine(RigDef::Flexbody &def, const std::string &line, int line_number=-1)
Definition: RigDef_Parser.cpp:894
RigDef::Parser::ParseMinimass
void ParseMinimass()
Definition: RigDef_Parser.cpp:2409
RigDef::Parser::ParseFileFormatVersion
void ParseFileFormatVersion()
Definition: RigDef_Parser.cpp:1042
RigDef::Parser::m_current_submesh
std::shared_ptr< Submesh > m_current_submesh
Parser state.
Definition: RigDef_Parser.h:279
RigDef::Parser::ParseProps
void ParseProps()
Definition: RigDef_Parser.cpp:2252
RigDef::Parser::ParseDirectiveAddAnimation
void ParseDirectiveAddAnimation()
Definition: RigDef_Parser.cpp:1094
RigDef::Parser::m_args
Token m_args[LINE_MAX_ARGS]
Tokens of current line.
Definition: RigDef_Parser.h:274
RigDef::Parser::ParseSetCollisionRange
void ParseSetCollisionRange()
Definition: RigDef_Parser.cpp:344
RigDef::Parser::ParseDescription
void ParseDescription()
Definition: RigDef_Parser.cpp:1089
RoR::VideoCamRole
VideoCamRole
Definition: Application.h:373
RigDef::Parser::ParseMeshWheel
void ParseMeshWheel()
Definition: RigDef_Parser.cpp:677
RigDef::Parser::ParseDirectivePropCameraMode
void ParseDirectivePropCameraMode()
Definition: RigDef_Parser.cpp:604
RigDef::Parser::ParseMaterialFlareBindings
void ParseMaterialFlareBindings()
Definition: RigDef_Parser.cpp:2457
RigDef::Parser::ParseTexcoords
void ParseTexcoords()
Definition: RigDef_Parser.cpp:846
RigDef::Parser::ParseFlexbody
void ParseFlexbody()
Definition: RigDef_Parser.cpp:864
RigDef::Parser::GetArgWheelSide
RoR::WheelSide GetArgWheelSide(int index)
Definition: RigDef_Parser.cpp:2870
RigDef::Parser::ParseShock
void ParseShock()
Definition: RigDef_Parser.cpp:2013
RigDef::Parser::m_filename
Ogre::String m_filename
Definition: RigDef_Parser.h:284
RigDef::Parser::ParseDirectiveSetManagedMaterialsOptions
void ParseDirectiveSetManagedMaterialsOptions()
Definition: RigDef_Parser.cpp:547
RigDef::Parser::ParseHook
void ParseHook()
Definition: RigDef_Parser.cpp:707
RigDef::Parser::GetArgBraking
WheelBraking GetArgBraking(int index)
Definition: RigDef_Parser.cpp:2943
RigDef::Parser::ParseSubmeshGroundModel
void ParseSubmeshGroundModel()
Definition: RigDef_Parser.cpp:492
RigDef::Parser::ParseCollisionBox
void ParseCollisionBox()
Definition: RigDef_Parser.cpp:1503
RigDef::Parser::ParseSetSkeletonSettings
void ParseSetSkeletonSettings()
Definition: RigDef_Parser.cpp:510
BitMask_t
uint32_t BitMask_t
Definition: BitFlags.h:7
RigDef::Parser::ParseSoundsources2
void ParseSoundsources2()
Definition: RigDef_Parser.cpp:1860
RigDef::Parser::ParseDirectiveForset
void ParseDirectiveForset()
Definition: RigDef_Parser.cpp:883
RigDef::Parser::ParseFlaregroupsNoImport
void ParseFlaregroupsNoImport()
Definition: RigDef_Parser.cpp:2068
RigDef::Parser::ParseEngoption
void ParseEngoption()
Definition: RigDef_Parser.cpp:1314
RigDef::EngineType
EngineType
Definition: RigDef_File.h:219
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: ForwardDeclarations.h:278
RigDef::Parser::GetArgManagedMatType
ManagedMaterialType GetArgManagedMatType(int index)
Definition: RigDef_Parser.cpp:3357
RigDef::Parser::GetArgNodeRef
Node::Ref GetArgNodeRef(int index)
Definition: RigDef_Parser.cpp:2962
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:2976
RigDef::Parser::m_resource_group
Ogre::String m_resource_group
Definition: RigDef_Parser.h:285
RigDef::Parser::ParseVideoCamera
void ParseVideoCamera()
Definition: RigDef_Parser.cpp:1666
RigDef::Parser::GetArgNodeOptions
BitMask_t GetArgNodeOptions(int index)
Definition: RigDef_Parser.cpp:3296
RigDef::Parser::GetArgWingSurface
WingControlSurface GetArgWingSurface(int index)
Definition: RigDef_Parser.cpp:3064
RigDef::Parser::GetArgStr
std::string GetArgStr(int index)
Definition: RigDef_Parser.cpp:2860
RigDef::Parser::ParseTorqueCurve
void ParseTorqueCurve()
Definition: RigDef_Parser.cpp:1776
RigDef::Parser::ParseNodesUnified
void ParseNodesUnified()
Definition: RigDef_Parser.cpp:2355
RigDef::Parser::m_current_module
std::shared_ptr< Document::Module > m_current_module
Definition: RigDef_Parser.h:270
RigDef::Parser::ProcessCurrentLine
void ProcessCurrentLine()
Definition: RigDef_Parser.cpp:76
RigDef::Parser::ParseTurbojets
void ParseTurbojets()
Definition: RigDef_Parser.cpp:1739
RigDef::Parser::GetArgPropulsion
WheelPropulsion GetArgPropulsion(int index)
Definition: RigDef_Parser.cpp:2926
RigDef::Parser::ParseParticles
void ParseParticles()
Definition: RigDef_Parser.cpp:2312
RigDef::Parser::GetArgVideoCamRole
RoR::VideoCamRole GetArgVideoCamRole(int index)
Definition: RigDef_Parser.cpp:3370
RigDef::WheelBraking
WheelBraking
Definition: RigDef_File.h:242
RigDef::Parser::ParseArgInt
int ParseArgInt(const char *str)
Definition: RigDef_Parser.cpp:3054
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:276
RigDef::Parser::ParseShock2
void ParseShock2()
Definition: RigDef_Parser.cpp:1986
RigDef::ManagedMaterialsOptions
Definition: RigDef_File.h:1023
RigDef::Parser::ParseSlidenodes
void ParseSlidenodes()
Definition: RigDef_Parser.cpp:1879
RigDef::DifferentialTypeVec
std::vector< DifferentialType > DifferentialTypeVec
Definition: RigDef_File.h:234
RigDef::Parser::GetArgEngineType
EngineType GetArgEngineType(int index)
Definition: RigDef_Parser.cpp:3341
RigDef::Parser::ParseDirectiveSection
void ParseDirectiveSection()
Definition: RigDef_Parser.cpp:2840
RigDef::Parser::GetArgCabOptions
BitMask_t GetArgCabOptions(int index)
Definition: RigDef_Parser.cpp:3116
RigDef::Parser::ParseManagedMaterials
void ParseManagedMaterials()
Definition: RigDef_Parser.cpp:2468
RigDef::Parser::TokenizeCurrentLine
int TokenizeCurrentLine()
Definition: RigDef_Parser.cpp:3386