RigsofRods
Soft-body Physics Simulation
RigDef_Validator.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_Validator.h"
27 
28 #include "Actor.h"
29 #include "SimConstants.h"
30 #include "Application.h"
31 #include "Console.h"
32 
33 #define CHECK_SECTION_IN_ALL_MODULES(_CLASS_, _FIELD_, _FUNCTION_) \
34 { \
35  std::list<std::shared_ptr<RigDef::Document::Module>>::iterator module_itor = m_selected_modules.begin(); \
36  for (; module_itor != m_selected_modules.end(); module_itor++) \
37  { \
38  std::vector<_CLASS_>::iterator section_itor = module_itor->get()->_FIELD_.begin(); \
39  for (; section_itor != module_itor->get()->_FIELD_.end(); section_itor++) \
40  { \
41  if (! _FUNCTION_(*section_itor))\
42  { \
43  section_itor = module_itor->get()->_FIELD_.erase(section_itor); \
44  if (section_itor == module_itor->get()->_FIELD_.end()) \
45  { \
46  break; \
47  } \
48  } \
49  } \
50  } \
51 }
52 
53 namespace RigDef
54 {
55 
57 {
58  bool valid = true;
59 
60  /* CHECK CONFIGURATION (SELECTED MODULES TOGETHER) */
61 
62  valid &= CheckSectionSubmeshGroundmodel(); /* Unique */
63 
64  valid &= CheckGearbox(); /* Min. 1 forward gear */
65 
66  /* CHECK INDIVIDUAL LINES (remove invalid entries) */
67 
69 
71 
73 
75 
77 
79 
81 
82  return valid;
83 }
84 
86 {
87  m_file = file;
88  m_selected_modules.push_back(file->root_module);
89  m_check_beams = true;
90 }
91 
92 void Validator::AddMessage(Validator::Message::Type type, Ogre::String const & text)
93 {
95  switch (type)
96  {
98  cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_ERROR;
99  break;
100 
101  case Message::TYPE_ERROR:
103  cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_WARNING;
104  break;
105 
106  default:
107  cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_NOTICE;
108  break;
109  }
110 
112 }
113 
115 {
116  Ogre::String *containing_module_name = nullptr;
117 
118  std::list<std::shared_ptr<RigDef::Document::Module>>::iterator module_itor = m_selected_modules.begin();
119  for (; module_itor != m_selected_modules.end(); module_itor++)
120  {
121  if (! module_itor->get()->submesh_groundmodel.empty())
122  {
123  if (containing_module_name == nullptr)
124  {
125  containing_module_name = & module_itor->get()->name;
126  }
127  else
128  {
129  std::stringstream text;
130  text << "Duplicate inline-section 'submesh_groundmodel'; found in modules: '"
131  << *containing_module_name << "' & '" << module_itor->get()->name << "'";
133  return false;
134  }
135  }
136  }
137 
138  return true;
139 }
140 
141 bool Validator::AddModule(Ogre::String const & module_name)
142 {
143  std::map< Ogre::String, std::shared_ptr<RigDef::Document::Module> >::iterator result
144  = m_file->user_modules.find(module_name);
145 
146  if (result != m_file->user_modules.end())
147  {
148  m_selected_modules.push_back(result->second);
149  return true;
150  }
151  return false;
152 }
153 
155 {
156  /* Find it */
157  std::shared_ptr<RigDef::Engine> engine;
158  std::list<std::shared_ptr<RigDef::Document::Module>>::iterator module_itor = m_selected_modules.begin();
159  for (; module_itor != m_selected_modules.end(); module_itor++)
160  {
161  if (module_itor->get()->engine.size() > 0)
162  {
163  if (module_itor->get()->engine[module_itor->get()->engine.size() - 1].gear_ratios.size() > 0)
164  {
165  return true;
166  }
167  else
168  {
169  AddMessage(Message::TYPE_FATAL_ERROR, "Engine must have at least 1 forward gear.");
170  return false;
171  }
172  }
173  }
174  return true;
175 }
176 
178 {
179  std::list<Ogre::String> bad_fields;
180 
181  /* Keep these in sync with wiki doc: http://www.rigsofrods.org/wiki/pages/Truck_Description_File#Shocks2 */
182  /* We safely check for value -1.f */
183  if (shock2.spring_in < -0.8f)
184  {
185  bad_fields.push_back("spring_in_rate");
186  }
187  if (shock2.damp_in < -0.8f)
188  {
189  bad_fields.push_back("damping_in_rate");
190  }
191  if (shock2.spring_out < -0.8f)
192  {
193  bad_fields.push_back("spring_out_rate");
194  }
195  if (shock2.damp_out < -0.8f)
196  {
197  bad_fields.push_back("damping_out_rate");
198  }
199  if (shock2.progress_factor_spring_in < -0.8f)
200  {
201  bad_fields.push_back("spring_in_progression_factor");
202  }
203  if (shock2.progress_factor_damp_in < -0.8f)
204  {
205  bad_fields.push_back("damping_in_progression_factor");
206  }
207  if (shock2.progress_factor_spring_out < -0.8f)
208  {
209  bad_fields.push_back("spring_out_progression_factor");
210  }
211  if (shock2.progress_factor_damp_out < -0.8f)
212  {
213  bad_fields.push_back("damping_out_progression_factor");
214  }
215  if (shock2.short_bound < -0.8f)
216  {
217  bad_fields.push_back("max_contraction");
218  }
219  if (shock2.long_bound < -0.8f)
220  {
221  bad_fields.push_back("max_extension");
222  }
223  if (shock2.precompression < -0.8f)
224  {
225  bad_fields.push_back("precompression");
226  }
227 
228  if (bad_fields.size() > 0)
229  {
230  std::stringstream msg;
231  msg << "Invalid values in section 'shocks2', fields: ";
232  std::list<Ogre::String>::iterator itor = bad_fields.begin();
233  bool first = true;
234  for( ; itor != bad_fields.end(); itor++)
235  {
236  msg << (first ? "" : ", ") << *itor;
237  first = false;
238  }
239 
240  AddMessage(Message::TYPE_ERROR, msg.str());
241  return false;
242  }
243  return true;
244 }
245 
247 {
248  std::list<Ogre::String> bad_fields;
249 
250  /* Keep these in sync with wiki doc: http://www.rigsofrods.org/wiki/pages/Truck_Description_File#Shocks3 */
251  /* We safely check for value -1.f */
252  if (shock3.spring_in < -0.8f)
253  {
254  bad_fields.push_back("spring_in_rate");
255  }
256  if (shock3.damp_in < -0.8f)
257  {
258  bad_fields.push_back("damping_in_rate");
259  }
260  if (shock3.spring_out < -0.8f)
261  {
262  bad_fields.push_back("spring_out_rate");
263  }
264  if (shock3.damp_out < -0.8f)
265  {
266  bad_fields.push_back("damping_out_rate");
267  }
268  if (shock3.damp_in_slow < -0.8f)
269  {
270  bad_fields.push_back("damp_in_slow");
271  }
272  if (shock3.split_vel_in < -0.8f)
273  {
274  bad_fields.push_back("split_in");
275  }
276  if (shock3.damp_in_fast < -0.8f)
277  {
278  bad_fields.push_back("damp_in_fast");
279  }
280  if (shock3.damp_out_slow < -0.8f)
281  {
282  bad_fields.push_back("damp_out_slow");
283  }
284  if (shock3.split_vel_out < -0.8f)
285  {
286  bad_fields.push_back("split_out");
287  }
288  if (shock3.damp_out_fast < -0.8f)
289  {
290  bad_fields.push_back("damp_out_fast");
291  }
292  if (shock3.short_bound < -0.8f)
293  {
294  bad_fields.push_back("max_contraction");
295  }
296  if (shock3.long_bound < -0.8f)
297  {
298  bad_fields.push_back("max_extension");
299  }
300  if (shock3.precompression < -0.8f)
301  {
302  bad_fields.push_back("precompression");
303  }
304 
305  if (bad_fields.size() > 0)
306  {
307  std::stringstream msg;
308  msg << "Invalid values in section 'shocks3', fields: ";
309  std::list<Ogre::String>::iterator itor = bad_fields.begin();
310  bool first = true;
311  for( ; itor != bad_fields.end(); itor++)
312  {
313  msg << (first ? "" : ", ") << *itor;
314  first = false;
315  }
316 
317  AddMessage(Message::TYPE_ERROR, msg.str());
318  return false;
319  }
320  return true;
321 }
322 
324 {
325  // Ignore non-source flags
326  unsigned int source_check = def.flags;
331  if (source_check != 0 || def.aero_animator.flags != 0)
332  {
333  return true;
334  }
335  else
336  {
337  AddMessage(Message::TYPE_ERROR, "Animator: No animator source defined");
338  return false;
339  }
340 }
341 
343 {
344  bool ok = true;
345 
346  if (def.extend_key >= MAX_COMMANDS)
347  {
348  std::stringstream msg;
349  msg << "Section 'commands' or 'commands2': Invalid 'extend_key': ";
350  msg << def.extend_key;
351  msg << "; valid range is <0 - " << MAX_COMMANDS << ">";
352  AddMessage(Message::TYPE_ERROR, msg.str());
353  ok = false;
354  }
355 
356  if (def.contract_key >= MAX_COMMANDS)
357  {
358  std::stringstream msg;
359  msg << "Section 'commands' or 'commands2': Invalid 'contract_key': ";
360  msg << def.contract_key;
361  msg << "; valid range is <0 - " << MAX_COMMANDS << ">";
362  AddMessage(Message::TYPE_ERROR, msg.str());
363  ok = false;
364  }
365 
366  return ok;
367 }
368 
370 {
371  bool ok = true;
372 
373  if (def.control_number < -1 || def.control_number > 500)
374  {
375  std::stringstream msg;
376  msg << "Wrong parameter 'control_number' (" << def.control_number << "), must be in range <-1, 500>";
377  AddMessage(Message::TYPE_ERROR, msg.str());
378  ok = false;
379  }
380 
381  if (def.blink_delay_milis < -2 || def.blink_delay_milis > 60000)
382  {
383  std::stringstream msg;
384  msg << "Wrong parameter 'blink_delay_milis' (" << def.blink_delay_milis << "), must be in range <-2, 60000>";
385  AddMessage(Message::TYPE_ERROR, msg.str());
386  ok = false;
387  }
388 
389  return ok;
390 }
391 
393 {
394  bool ok = true;
395 
396  bool hook_toggle =
399 
401  bool inv_trigger_blocker = BITMASK_IS_1(def.options, RigDef::Trigger::OPTION_A_INV_TRIGGER_BLOCKER);
402 
404  {
405  if (! trigger_blocker && ! inv_trigger_blocker && ! hook_toggle )
406  {
407  /* Make the full check */
409  {
410  std::stringstream msg;
411  msg << "Wrong parameter 'shortbound_trigger_action': " << def.shortbound_trigger_action;
412  msg << "; Alloved range is <0 - " << MAX_COMMANDS << ">. ";
413  msg << "Trigger deactivated.";
414  AddMessage(Message::TYPE_ERROR, msg.str());
415  ok = false;
416  }
417  }
418  else if (! hook_toggle)
419  {
420  /* This is a Trigger-Blocker, make special check */
421  if (def.shortbound_trigger_action < 0)
422  {
423  std::stringstream msg;
424  msg << "Wrong parameter 'shortbound_trigger_action': " << def.shortbound_trigger_action;
425  msg << "; Alloved range is <0 - " << MAX_COMMANDS << ">. ";
426  msg << "Trigger deactivated.";
427  AddMessage(Message::TYPE_ERROR, msg.str());
428  ok = false;
429  }
430  if (def.longbound_trigger_action < 0)
431  {
432  std::stringstream msg;
433  msg << "Wrong parameter 'longbound_trigger_action': " << def.longbound_trigger_action;
434  msg << "; Alloved range is <0 - " << MAX_COMMANDS << ">. ";
435  msg << "Trigger deactivated.";
436  AddMessage(Message::TYPE_ERROR, msg.str());
437  ok = false;
438  }
439  }
440  }
441  else
442  {
443  /* Engine trigger */
444  if (trigger_blocker || inv_trigger_blocker || hook_toggle || BITMASK_IS_1(def.options, RigDef::Trigger::OPTION_s_CMD_NUM_SWITCH))
445  {
446  AddMessage(Message::TYPE_ERROR, "Wrong command-eventnumber. Engine trigger deactivated.");
447  ok = false;
448  }
449  }
450 
451  return ok;
452 }
453 
455 {
456  bool ok = true;
457 
458  /* disabled isPowerOfTwo, as it can be a renderwindow now with custom resolution */
459  if (def.texture_width <= 0 || def.texture_height <= 0)
460  {
461  AddMessage(Message::TYPE_ERROR, "Wrong texture size definition.");
462  ok = false;
463  }
464 
465  if (def.min_clip_distance < 0 || def.min_clip_distance > def.max_clip_distance || def.max_clip_distance < 0)
466  {
467  AddMessage(Message::TYPE_ERROR, "Wrong clipping sizes definition.");
468  ok = false;
469  }
470 
471  if (def.camera_mode < -2 )
472  {
473  AddMessage(Message::TYPE_ERROR, "Camera Mode setting incorrect.");
474  ok = false;
475  }
476 
477  if (def.camera_role < -1 || def.camera_role >1)
478  {
479  AddMessage(Message::TYPE_ERROR, "Camera Role (camera, trace, mirror) setting incorrect.");
480  ok = false;
481  }
482 
483  return ok;
484 }
485 
486 } // namespace RigDef
RigDef::Validator::CheckShock2
bool CheckShock2(RigDef::Shock2 &shock2)
Definition: RigDef_Validator.cpp:177
RigDef::Command2::contract_key
unsigned int contract_key
Definition: RigDef_File.h:764
MAX_COMMANDS
static const int MAX_COMMANDS
maximum number of commands per actor
Definition: SimConstants.h:28
RigDef::Validator::Message::TYPE_ERROR
@ TYPE_ERROR
Definition: RigDef_Validator.h:57
RigDef::Command2::extend_key
unsigned int extend_key
Definition: RigDef_File.h:765
RigDef::Shock2::spring_out
float spring_out
spring value applied when shock extending
Definition: RigDef_File.h:1206
RigDef::Validator::m_check_beams
bool m_check_beams
Definition: RigDef_Validator.h:123
RigDef::Trigger::OPTION_A_INV_TRIGGER_BLOCKER
static const BitMask_t OPTION_A_INV_TRIGGER_BLOCKER
Definition: RigDef_File.h:1370
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:1236
RigDef::Validator::CheckFlare2
bool CheckFlare2(RigDef::Flare2 &def)
Definition: RigDef_Validator.cpp:369
RigDef::VideoCamera::min_clip_distance
float min_clip_distance
Definition: RigDef_File.h:1425
RigDef::Validator::Message::Type
Type
Definition: RigDef_Validator.h:53
RigDef::VideoCamera::texture_width
unsigned int texture_width
Definition: RigDef_File.h:1423
CHECK_SECTION_IN_ALL_MODULES
#define CHECK_SECTION_IN_ALL_MODULES(_CLASS_, _FIELD_, _FUNCTION_)
Definition: RigDef_Validator.cpp:33
file
This is a raw Ogre binding for Imgui No project cmake file
Definition: README-OgreImGui.txt:3
RigDef::Validator::CheckVideoCamera
bool CheckVideoCamera(RigDef::VideoCamera &def)
Section 'videocamera'.
Definition: RigDef_Validator.cpp:454
RigDef::Validator::CheckTrigger
bool CheckTrigger(RigDef::Trigger &def)
Definition: RigDef_Validator.cpp:392
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:1235
RigDef::Validator::m_selected_modules
std::list< std::shared_ptr< RigDef::Document::Module > > m_selected_modules
Definition: RigDef_Validator.h:122
RigDef::VideoCamera::camera_mode
int camera_mode
Definition: RigDef_File.h:1428
RigDef::Trigger::longbound_trigger_action
int longbound_trigger_action
Definition: RigDef_File.h:1385
RigDef::Shock2::spring_in
float spring_in
Spring value applied when the shock is compressing.
Definition: RigDef_File.h:1202
SimConstants.h
RigDef::Flare2
Definition: RigDef_File.h:870
RigDef::Trigger
Definition: RigDef_File.h:1363
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:1239
Console.h
RoR::Console::putMessage
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
Definition: Console.cpp:97
RigDef::Validator::CheckCommand
bool CheckCommand(RigDef::Command2 &def)
Definition: RigDef_Validator.cpp:342
RigDef::Validator::Message::TYPE_WARNING
@ TYPE_WARNING
Definition: RigDef_Validator.h:56
RigDef::VideoCamera::camera_role
int camera_role
Definition: RigDef_File.h:1427
RigDef::Flare2::blink_delay_milis
int blink_delay_milis
Definition: RigDef_File.h:879
RigDef::Validator::Setup
void Setup(RigDef::DocumentPtr file)
Prepares the validation.
Definition: RigDef_Validator.cpp:85
RigDef::Shock2::long_bound
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1211
RigDef::Trigger::options
BitMask_t options
Definition: RigDef_File.h:1380
RigDef::Trigger::OPTION_B_TRIGGER_BLOCKER
static const BitMask_t OPTION_B_TRIGGER_BLOCKER
Definition: RigDef_File.h:1369
Actor.h
RigDef::Animator::OPTION_INVISIBLE
static const BitMask_t OPTION_INVISIBLE
Definition: RigDef_File.h:553
RigDef::Shock3::damp_in
float damp_in
Damping value applied when the shock is compressing.
Definition: RigDef_File.h:1228
RigDef::Shock2::damp_out
float damp_out
damping value applied when shock extending
Definition: RigDef_File.h:1207
RigDef::Shock3::spring_out
float spring_out
Spring value applied when shock extending.
Definition: RigDef_File.h:1229
RigDef::Command2
Definition: RigDef_File.h:757
RigDef::Validator::CheckShock3
bool CheckShock3(RigDef::Shock3 &shock3)
Definition: RigDef_Validator.cpp:246
RigDef::AeroAnimator::flags
BitMask_t flags
Definition: RigDef_File.h:399
BITMASK_SET_0
#define BITMASK_SET_0(VAR, FLAGS)
Definition: BitFlags.h:16
RigDef::Validator::CheckSectionSubmeshGroundmodel
bool CheckSectionSubmeshGroundmodel()
Inline-ection 'submesh_groundmodel', unique across all modules.
Definition: RigDef_Validator.cpp:114
BITMASK_IS_0
#define BITMASK_IS_0(VAR, FLAGS)
Definition: BitFlags.h:13
RigDef::Animator::OPTION_LONG_LIMIT
static const BitMask_t OPTION_LONG_LIMIT
Definition: RigDef_File.h:580
RigDef::VideoCamera::texture_height
unsigned int texture_height
Definition: RigDef_File.h:1424
RigDef::Shock2
Definition: RigDef_File.h:1192
RigDef::Validator::AddMessage
void AddMessage(Validator::Message::Type type, Ogre::String const &text)
Definition: RigDef_Validator.cpp:92
RigDef_Validator.h
.truck format validator
RigDef::Validator::CheckAnimator
bool CheckAnimator(RigDef::Animator &def)
Definition: RigDef_Validator.cpp:323
RigDef
Definition: RigDef_File.cpp:32
BITMASK_IS_1
#define BITMASK_IS_1(VAR, FLAGS)
Definition: BitFlags.h:14
RigDef::Shock2::short_bound
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1210
RoR::Console::MessageType
MessageType
Definition: Console.h:46
RigDef::Shock3::spring_in
float spring_in
Spring value applied when the shock is compressing.
Definition: RigDef_File.h:1227
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:1212
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:1208
Application.h
Central state/object manager and communications hub.
RigDef::Shock3::long_bound
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1238
RoR::App::GetConsole
Console * GetConsole()
Definition: Application.cpp:270
RigDef::Animator::flags
BitMask_t flags
Definition: RigDef_File.h:584
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:1233
RigDef::Animator::aero_animator
AeroAnimator aero_animator
Definition: RigDef_File.h:587
RigDef::Trigger::OPTION_s_CMD_NUM_SWITCH
static const BitMask_t OPTION_s_CMD_NUM_SWITCH
Definition: RigDef_File.h:1371
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:1204
RigDef::Trigger::shortbound_trigger_action
int shortbound_trigger_action
Definition: RigDef_File.h:1384
RigDef::Animator
Definition: RigDef_File.h:550
RigDef::Trigger::OPTION_h_UNLOCKS_HOOK_GROUP
static const BitMask_t OPTION_h_UNLOCKS_HOOK_GROUP
Definition: RigDef_File.h:1372
RigDef::VideoCamera
Definition: RigDef_File.h:1411
RigDef::Animator::OPTION_VISIBLE
static const BitMask_t OPTION_VISIBLE
Definition: RigDef_File.h:552
RigDef::Trigger::OPTION_E_ENGINE_TRIGGER
static const BitMask_t OPTION_E_ENGINE_TRIGGER
Definition: RigDef_File.h:1375
RigDef::Validator::m_file
RigDef::DocumentPtr m_file
The parsed input file.
Definition: RigDef_Validator.h:121
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:1232
RigDef::Shock3::short_bound
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
Definition: RigDef_File.h:1237
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:1205
RigDef::Shock3
Definition: RigDef_File.h:1218
RigDef::VideoCamera::max_clip_distance
float max_clip_distance
Definition: RigDef_File.h:1426
RigDef::Flare2::control_number
int control_number
Only 'u' type flares.
Definition: RigDef_File.h:877
RigDef::Shock2::damp_in
float damp_in
Damping value applied when the shock is compressing.
Definition: RigDef_File.h:1203
RoR::Console::CONSOLE_MSGTYPE_ACTOR
@ CONSOLE_MSGTYPE_ACTOR
Parsing/spawn/simulation messages for actors.
Definition: Console.h:63
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: RigDef_Prerequisites.h:38
RigDef::Validator::Validate
bool Validate()
Definition: RigDef_Validator.cpp:56
RigDef::Animator::OPTION_SHORT_LIMIT
static const BitMask_t OPTION_SHORT_LIMIT
Definition: RigDef_File.h:579
RigDef::Trigger::OPTION_H_LOCKS_HOOK_GROUP
static const BitMask_t OPTION_H_LOCKS_HOOK_GROUP
Definition: RigDef_File.h:1373
RigDef::Validator::AddModule
bool AddModule(Ogre::String const &module_name)
Adds a vehicle module to the validated configuration.
Definition: RigDef_Validator.cpp:141
RigDef::Validator::CheckGearbox
bool CheckGearbox()
Checks there's at least 1 forward gear.
Definition: RigDef_Validator.cpp:154
RigDef::Shock3::damp_out
float damp_out
Damping value applied when shock extending.
Definition: RigDef_File.h:1230
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:1231
RigDef::Validator::Message::TYPE_FATAL_ERROR
@ TYPE_FATAL_ERROR
Definition: RigDef_Validator.h:58
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:1209
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:1234