RigsofRods
Soft-body Physics Simulation
ActorSpawner.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-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 
26 
27 
28 #pragma once
29 
30 #include "Application.h"
31 #include "RigDef_Parser.h"
32 #include "SimData.h"
33 #include "FlexFactory.h"
34 #include "FlexObj.h"
35 
36 #include <OgreString.h>
37 #include <string>
38 
39 namespace RoR {
40 
43 
71 {
72  friend class RoR::FlexFactory; // Needs to use `ComposeName()` and `SetupNewEntity()`
73 
74 public:
75 
77  {
78  size_t num_nodes = 0;
79  size_t num_beams = 0;
80  size_t num_shocks = 0;
81  size_t num_rotators = 0;
82  size_t num_wings = 0;
83  size_t num_airbrakes = 0;
84  size_t num_fixes = 0;
85  // ... more to come ...
86  };
87 
88  enum struct Message
89  {
90  TYPE_INFO,
92  TYPE_ERROR,
93  };
94 
97  void ConfigureSections(Ogre::String const & sectionconfig, RigDef::DocumentPtr def);
98  void ConfigureAddonParts(TuneupDefPtr& tuneup_def);
101  static void SetupDefaultSoundSources(ActorPtr const& actor);
103 
106  ActorPtr GetActor() { return m_actor; }
108  std::string GetSubmeshGroundmodelName();
110 
111 private:
112 
114  {
115  enum class MirrorPropType
116  {
117  MPROP_NONE,
118  MPROP_LEFT,
119  MPROP_RIGHT,
120  };
121 
123  material_flare_def(nullptr),
124  video_camera_def(nullptr),
125  mirror_prop_type(MirrorPropType::MPROP_NONE),
126  mirror_prop_scenenode(nullptr)
127  {}
128 
129  CustomMaterial(Ogre::MaterialPtr& mat):
130  material(mat),
131  material_flare_def(nullptr),
132  video_camera_def(nullptr),
133  mirror_prop_type(MirrorPropType::MPROP_NONE),
134  mirror_prop_scenenode(nullptr)
135  {}
136 
137  Ogre::MaterialPtr material;
141  Ogre::SceneNode* mirror_prop_scenenode;
142  };
143 
144  struct Exception: public std::runtime_error
145  {
146  Exception(Ogre::String const & message):runtime_error(message) {}
147  };
148 
151  // PLEASE maintain alphabetical order
152  void ProcessAirbrake(RigDef::Airbrake & def);
153  void ProcessAnimator(RigDef::Animator & def);
155  void ProcessAuthor(RigDef::Author & def);
156  void ProcessAxle(RigDef::Axle & def);
157  void ProcessBeam(RigDef::Beam & def);
158  void ProcessBrakes(RigDef::Brakes & def);
160  void ProcessCamera(RigDef::Camera & def);
161  void ProcessCinecam(RigDef::Cinecam & def);
164  void ProcessCommand(RigDef::Command2 & def);
165  void ProcessContacter(RigDef::Node::Ref & node_ref);
167  void ProcessDescription(Ogre::String const& line);
168  void ProcessEngine(RigDef::Engine & def);
170  void ProcessEngturbo(RigDef::Engturbo & def);
171  void ProcessExhaust(RigDef::Exhaust & def);
173  void ProcessFixedNode(RigDef::Node::Ref node_ref); // 'fixes'
174  void ProcessFlare2(RigDef::Flare2 & def);
175  void ProcessFlare3(RigDef::Flare3 & def);
178  void ProcessFusedrag(RigDef::Fusedrag & def);
179  void ProcessGlobals(RigDef::Globals & def);
181  void ProcessHelp(RigDef::Help & def);
182  void ProcessHook(RigDef::Hook & def);
183  void ProcessHydro(RigDef::Hydro & def);
185  void ProcessLockgroup(RigDef::Lockgroup & lockgroup);
189  void ProcessMinimass(RigDef::Minimass & def);
190  void ProcessNode(RigDef::Node & def);
191  void ProcessParticle(RigDef::Particle & def);
193  void ProcessProp(RigDef::Prop & def);
195  void ProcessRopable(RigDef::Ropable & def);
196  void ProcessRope(RigDef::Rope & def);
197  void ProcessRotator(RigDef::Rotator & def);
198  void ProcessRotator2(RigDef::Rotator2 & def);
200  void ProcessShock(RigDef::Shock & def);
201  void ProcessShock2(RigDef::Shock2 & def);
202  void ProcessShock3(RigDef::Shock3 & def);
207  void ProcessSubmesh(RigDef::Submesh & def);
208  void ProcessTie(RigDef::Tie & def);
212  void ProcessTrigger(RigDef::Trigger & def);
213  void ProcessTurbojet(RigDef::Turbojet & def);
216  void ProcessWheel(RigDef::Wheel & def);
217  void ProcessWheel2(RigDef::Wheel2 & def);
218  void ProcessWing(RigDef::Wing & def);
220 
223 
224  void BuildAeroEngine(
225  NodeNum_t ref_node_index,
226  NodeNum_t back_node_index,
227  NodeNum_t blade_1_node_index,
228  NodeNum_t blade_2_node_index,
229  NodeNum_t blade_3_node_index,
230  NodeNum_t blade_4_node_index,
231  NodeNum_t couplenode_index,
232  bool is_turboprops,
233  Ogre::String const & airfoil,
234  float power,
235  float pitch);
236 
238 
239  void _ProcessKeyInertia(
240  RigDef::Inertia & inertia,
241  RigDef::Inertia & inertia_defaults,
242  RoR::CmdKeyInertia& contract_key,
243  RoR::CmdKeyInertia& extend_key);
244 
246  void BuildWheelBeams(
247  unsigned int num_rays,
248  NodeNum_t base_node_index,
249  node_t *axis_node_1,
250  node_t *axis_node_2,
251  float tyre_spring,
252  float tyre_damping,
253  float rim_spring,
254  float rim_damping,
255  std::shared_ptr<RigDef::BeamDefaults> beam_defaults,
256  RigDef::Node::Ref const & rigidity_node_id,
257  float max_extension = 0.f);
258 
260  unsigned int AddWheelBeam(
261  node_t *node_1,
262  node_t *node_2,
263  float spring,
264  float damping,
265  std::shared_ptr<RigDef::BeamDefaults> beam_defaults,
266  float max_contraction = -1.f,
267  float max_extension = -1.f,
268  BeamType type = BEAM_NORMAL);
269 
274  WheelID_t wheel_id,
275  unsigned int num_rays,
276  node_t *axis_node_1,
277  node_t *axis_node_2,
278  node_t *reference_arm_node,
279  unsigned int reserve_nodes,
280  unsigned int reserve_beams,
281  float wheel_radius,
282  RigDef::WheelPropulsion propulsion,
283  RigDef::WheelBraking braking,
284  std::shared_ptr<RigDef::NodeDefaults> node_defaults,
285  float wheel_mass,
286  float wheel_width = -1.f);
287 
289  std::pair<unsigned int, bool> AddNode(RigDef::Node::Id & id);
290  void InitNode(node_t & node, Ogre::Vector3 const & position);
291  void InitNode(unsigned int node_index, Ogre::Vector3 const & position);
292  void InitNode(node_t & node, Ogre::Vector3 const & position, std::shared_ptr<RigDef::NodeDefaults> node_defaults);
293  beam_t& AddBeam(node_t & node_1, node_t & node_2, std::shared_ptr<RigDef::BeamDefaults> & defaults, int detacher_group);
294  unsigned int AddWheelRimBeam(RigDef::Wheel2 & wheel_2_def, node_t *node_1, node_t *node_2);
295  unsigned int AddTyreBeam(RigDef::Wheel2 & wheel_2_def, node_t *node_1, node_t *node_2);
296  unsigned int _SectionWheels2AddBeam(RigDef::Wheel2 & wheel_2_def, node_t *node_1, node_t *node_2);
298  WheelID_t AddWheel2(RigDef::Wheel2 & wheel_2_def); // 'wheels2'
299  void GetWheelAxisNodes(RigDef::BaseWheel& def, node_t*& out_node_1, node_t*& out_node_2);
300  void AddExhaust(NodeNum_t emitter_node_idx, NodeNum_t direction_node_idx);
301  RailGroup* CreateRail(std::vector<RigDef::Node::Range> & node_ranges);
302  void InitializeRig();
303  void FinalizeRig();
305 
308  void CalcMemoryRequirements(ActorMemoryRequirements& req, RigDef::Document::Module* module_def);
311  void WashCalculator();
312  void AdjustNodeBuoyancy(node_t & node, RigDef::Node & node_def, std::shared_ptr<RigDef::NodeDefaults> defaults);
313  void AdjustNodeBuoyancy(node_t & node, std::shared_ptr<RigDef::NodeDefaults> defaults);
314  void InitBeam(beam_t & beam, node_t *node_1, node_t *node_2);
315  void CalculateBeamLength(beam_t & beam);
316  void SetBeamStrength(beam_t & beam, float strength);
317  void SetBeamSpring(beam_t & beam, float spring);
318  void SetBeamDamping(beam_t & beam, float damping);
319  void SetBeamDeformationThreshold(beam_t & beam, std::shared_ptr<RigDef::BeamDefaults> beam_defaults);
320  void ValidateRotator(int id, int axis1, int axis2, NodeNum_t *nodes1, NodeNum_t *nodes2);
321 
323  std::string ComposeName(const std::string& object, int number = -1);
324 
328  bool AssignWheelToAxle(int & _out_axle_wheel, node_t *axis_node_1, node_t *axis_node_2);
329 
330  // GetFree*(): Gets a free slot; checks limits, sets it's array position and updates 'free_node' index.
331  node_t& GetFreeNode();
332  beam_t& GetFreeBeam();
333  node_t& GetAndInitFreeNode(Ogre::Vector3 const & position);
334  beam_t& GetAndInitFreeBeam(node_t & node_1, node_t & node_2);
336 
337  float ComputeWingArea(
338  Ogre::Vector3 const & ref,
339  Ogre::Vector3 const & x,
340  Ogre::Vector3 const & y,
341  Ogre::Vector3 const & aref);
342 
346  std::vector<RigDef::Node::Range> & node_ranges,
347  std::vector<NodeNum_t> & out_node_indices);
349 
352  node_t* GetBeamNodePointer(RigDef::Node::Ref const & node_ref);
353  NodeNum_t FindNodeIndex(RigDef::Node::Ref & node_ref, bool silent = false);
354  NodeNum_t ResolveNodeRef(RigDef::Node::Ref const & node_ref);
355  node_t* GetNodePointer(RigDef::Node::Ref const & node_ref);
357  beam_t& GetBeam(unsigned int index);
358  beam_t* FindBeamInRig(NodeNum_t node_a, NodeNum_t node_b);
361 
364  bool CheckParticleLimit(unsigned int count);
365  bool CheckAxleLimit(unsigned int count);
366  bool CheckSubmeshLimit(unsigned int count);
367  bool CheckTexcoordLimit(unsigned int count);
368  bool CheckCabLimit(unsigned int count);
369  bool CheckCameraRailLimit(unsigned int count);
370  static bool CheckSoundScriptLimit(ActorPtr const& vehicle, unsigned int count);
371  bool CheckAeroEngineLimit(unsigned int count);
372  bool CheckScrewpropLimit(unsigned int count);
374 
377  void CreateBeamVisuals(beam_t const& beam, int beam_index, bool visible, std::shared_ptr<RigDef::BeamDefaults> const& beam_defaults, std::string material_override="");
378  void CreateWheelSkidmarks(WheelID_t wheel_index);
379  void FinalizeGfxSetup();
380  Ogre::MaterialPtr FindOrCreateCustomizedMaterial(const std::string& mat_lookup_name, const std::string& mat_lookup_rg);
381  Ogre::MaterialPtr CreateSimpleMaterial(Ogre::ColourValue color);
382  Ogre::ParticleSystem* CreateParticleSystem(std::string const & name, std::string const & template_name);
383  RigDef::MaterialFlareBinding* FindFlareBindingForMaterial(std::string const & material_name);
384  RigDef::VideoCamera* FindVideoCameraByMaterial(std::string const & material_name);
386  void CreateMirrorPropVideoCam(Ogre::MaterialPtr custom_mat, CustomMaterial::MirrorPropType type, Ogre::SceneNode* prop_scenenode);
387  void SetupNewEntity(Ogre::Entity* e, Ogre::ColourValue simple_color);
388  Ogre::MaterialPtr InstantiateManagedMaterial(Ogre::String const & rg_name, Ogre::String const & source_name, Ogre::String const & clone_name);
389  void CreateCabVisual();
390  void CreateMaterialFlare(int flare_index, Ogre::MaterialPtr mat);
391  std::string GetCurrentElementMediaRG();
392  void AssignManagedMaterialTexture(Ogre::TextureUnitState* tus, const std::string & mm_name, int media_id, const std::string& tex_name);
393 
395  void CreateWheelVisuals(
396  WheelID_t wheel_id,
397  NodeNum_t node_base_index,
398  unsigned int def_num_rays,
399  Ogre::String const& face_material_name,
400  Ogre::String const& face_material_rg,
401  Ogre::String const& band_material_name,
402  Ogre::String const& band_material_rg,
403  bool separate_rim,
404  float rim_ratio = 1.f
405  );
406 
408  WheelID_t wheel_id,
409  NodeNum_t node_base_index,
410  NodeNum_t axis_node_1,
411  NodeNum_t axis_node_2,
412  int num_rays,
413  float radius,
414  WheelSide side,
415  std::string rim_mesh_name,
416  std::string rim_mesh_rg,
417  std::string tire_mesh_name,
418  std::string tire_mesh_rg);
419 
421  WheelID_t wheel_id,
422  NodeNum_t base_node_index,
423  NodeNum_t axis_node_1_index,
424  NodeNum_t axis_node_2_index,
425  unsigned int num_rays,
426  WheelSide side,
427  Ogre::String mesh_name,
428  Ogre::String mesh_rg,
429  Ogre::String material_name,
430  Ogre::String material_rg,
431  float rim_radius);
433 
436  static void AddSoundSource(ActorPtr const& vehicle, SoundScriptInstancePtr sound_script, NodeNum_t node_index, int type = -2);
437  static void AddSoundSourceInstance(ActorPtr const& vehicle, Ogre::String const & sound_script_name, int node_index, int type = -2);
439 
442  void AddMessage(Message type, Ogre::String const & text);
444  void HandleException();
446 
448  {
449  // Minimum node mass
451  };
452 
457  std::list<std::shared_ptr<RigDef::Document::Module>>
459  Ogre::Vector3 m_spawn_position;
465 
469  std::string m_cab_material_name;
470  std::string m_help_material_name;
471  float m_wing_area;
477  float m_fuse_y_max;
479  std::vector<CabTexcoord> m_oldstyle_cab_texcoords;
480  std::vector<CabSubmesh> m_oldstyle_cab_submeshes;
482  std::shared_ptr<RigDef::Document::Module> m_current_module;
483  std::map<Ogre::String, unsigned int> m_named_nodes;
485 
489  std::map<std::string, CustomMaterial> m_material_substitutions;
490  std::map<std::string, Ogre::MaterialPtr> m_managed_materials;
492  Ogre::MaterialPtr m_cab_trans_material;
493  Ogre::MaterialPtr m_simple_material_base;
497  // Grouping nodes for diagnostics:
498  Ogre::SceneNode* m_actor_grouping_scenenode = nullptr;
499  Ogre::SceneNode* m_wheels_parent_scenenode = nullptr;
500  Ogre::SceneNode* m_props_parent_scenenode = nullptr;
501  Ogre::SceneNode* m_flexbodies_parent_scenenode = nullptr;
502  Ogre::SceneNode* m_flares_parent_scenenode = nullptr;
503  Ogre::SceneNode* m_particles_parent_scenenode = nullptr;
504 };
506 
508 
509 } // namespace RoR
RoR::ActorSpawner::ProcessWing
void ProcessWing(RigDef::Wing &def)
Definition: ActorSpawner.cpp:920
RoR::ActorSpawner::m_current_module
std::shared_ptr< RigDef::Document::Module > m_current_module
For resolving addonparts.
Definition: ActorSpawner.h:482
RoR::ActorSpawner::CustomMaterial::MirrorPropType::MPROP_RIGHT
@ MPROP_RIGHT
RoR::ActorSpawner::CheckSubmeshLimit
bool CheckSubmeshLimit(unsigned int count)
Definition: ActorSpawner.cpp:6153
RigDef::Wheel
Definition: RigDef_File.h:1439
RoR::ActorSpawner::ActorMemoryRequirements::num_rotators
size_t num_rotators
Definition: ActorSpawner.h:81
RoR::ActorSpawner::ProcessHook
void ProcessHook(RigDef::Hook &def)
Definition: ActorSpawner.cpp:3187
RigDef::GuiSettings
Definition: RigDef_File.h:942
RoR::ActorSpawner::AddSoundSource
static void AddSoundSource(ActorPtr const &vehicle, SoundScriptInstancePtr sound_script, NodeNum_t node_index, int type=-2)
Definition: ActorSpawner.cpp:1186
RoR::ActorSpawner::ProcessHydro
void ProcessHydro(RigDef::Hydro &def)
Definition: ActorSpawner.cpp:3902
y
float y
Definition: (ValueTypes) quaternion.h:6
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
RoR::ActorSpawner::m_current_keyword
RigDef::Keyword m_current_keyword
For error reports.
Definition: ActorSpawner.h:481
RigDef::Prop
Definition: RigDef_File.h:1078
RoR::ActorSpawner::ProcessSubmesh
void ProcessSubmesh(RigDef::Submesh &def)
Definition: ActorSpawner.cpp:1334
RoR::ActorSpawner::ProcessGlobals
void ProcessGlobals(RigDef::Globals &def)
Definition: ActorSpawner.cpp:6101
RoR::ActorSpawner::m_custom_resource_group
std::string m_custom_resource_group
Definition: ActorSpawner.h:461
RoR::BeamType
BeamType
Definition: SimData.h:69
RoR::ActorSpawner::ProcessFlare2
void ProcessFlare2(RigDef::Flare2 &def)
Definition: ActorSpawner.cpp:2126
RoR::ActorSpawner::GetBeam
beam_t & GetBeam(unsigned int index)
Definition: ActorSpawner.cpp:6243
RoR::ActorSpawner::ProcessRope
void ProcessRope(RigDef::Rope &def)
Definition: ActorSpawner.cpp:2944
RoR::ActorSpawner::CheckCameraRailLimit
bool CheckCameraRailLimit(unsigned int count)
Definition: ActorSpawner.cpp:6202
RigDef::CollisionRange
Definition: RigDef_File.h:758
RoR::ActorSpawner::ProcessSoundSource
void ProcessSoundSource(RigDef::SoundSource &def)
Definition: ActorSpawner.cpp:1204
RigDef::Engturbo
Definition: RigDef_File.h:831
RoR::ActorSpawner::FindFlareBindingForMaterial
RigDef::MaterialFlareBinding * FindFlareBindingForMaterial(std::string const &material_name)
Returns NULL if none found.
Definition: ActorSpawner.cpp:6480
RoR::ActorSpawner::ConfigureSections
void ConfigureSections(Ogre::String const &sectionconfig, RigDef::DocumentPtr def)
Definition: ActorSpawner.cpp:90
RoR::ActorSpawner::AddWheel2
WheelID_t AddWheel2(RigDef::Wheel2 &wheel_2_def)
Definition: ActorSpawner.cpp:4882
RigDef::Author
Definition: RigDef_File.h:611
RoR::ActorSpawner::ActorMemoryRequirements::num_fixes
size_t num_fixes
Definition: ActorSpawner.h:84
RoR::ActorSpawner::ProcessMinimass
void ProcessMinimass(RigDef::Minimass &def)
Definition: ActorSpawner.cpp:1580
RoR::ActorSpawner::ProcessEngine
void ProcessEngine(RigDef::Engine &def)
Definition: ActorSpawner.cpp:5417
RoR::ActorSpawner::ProcessGuiSettings
void ProcessGuiSettings(RigDef::GuiSettings &def)
Definition: ActorSpawner.cpp:1240
RoR::ActorSpawner::m_file
RigDef::DocumentPtr m_file
Definition: ActorSpawner.h:456
RoR::ActorSpawner::m_fuse_z_min
float m_fuse_z_min
Definition: ActorSpawner.h:474
RoR::ActorSpawner::ProcessBrakes
void ProcessBrakes(RigDef::Brakes &def)
Definition: ActorSpawner.cpp:5365
RigDef::Flare3
Definition: RigDef_File.h:890
RoR::RailGroup
A series of RailSegment-s for SlideNode to slide along. Can be closed in a loop.
Definition: SlideNode.h:53
RoR::ActorSpawner::m_particles_parent_scenenode
Ogre::SceneNode * m_particles_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
Definition: ActorSpawner.h:503
RigDef::RailGroup
Definition: RigDef_File.h:1119
RoR::ActorSpawner::m_actor_grouping_scenenode
Ogre::SceneNode * m_actor_grouping_scenenode
Topmost common parent; this isn't used for moving things, just helps developers inspect the scene gra...
Definition: ActorSpawner.h:498
RoR::ActorSpawner::ComposeName
std::string ComposeName(const std::string &object, int number=-1)
Creates name containing actor ID token, i.e. "Object#1 (filename.truck [Instance ID 1])".
Definition: ActorSpawner.cpp:699
RoR::ActorSpawner::ProcessExtCamera
void ProcessExtCamera(RigDef::ExtCamera &def)
Definition: ActorSpawner.cpp:1231
RoR::ActorSpawner::ProcessRotator
void ProcessRotator(RigDef::Rotator &def)
Definition: ActorSpawner.cpp:3453
RoR::ActorSpawner::ProcessHelp
void ProcessHelp(RigDef::Help &def)
Definition: ActorSpawner.cpp:5446
RoR::ActorSpawner::SetBeamDeformationThreshold
void SetBeamDeformationThreshold(beam_t &beam, std::shared_ptr< RigDef::BeamDefaults > beam_defaults)
Definition: ActorSpawner.cpp:5556
RoR::ActorSpawner::BuildWheelBeams
void BuildWheelBeams(unsigned int num_rays, NodeNum_t base_node_index, node_t *axis_node_1, node_t *axis_node_2, float tyre_spring, float tyre_damping, float rim_spring, float rim_damping, std::shared_ptr< RigDef::BeamDefaults > beam_defaults, RigDef::Node::Ref const &rigidity_node_id, float max_extension=0.f)
'wheels', 'meshwheels'
Definition: ActorSpawner.cpp:4762
RigDef::Camera
Definition: RigDef_File.h:725
RoR::ActorSpawner::AddExhaust
void AddExhaust(NodeNum_t emitter_node_idx, NodeNum_t direction_node_idx)
Definition: ActorSpawner.cpp:6018
RigDef::Hydro
Definition: RigDef_File.h:972
RoR::ActorSpawner::ProcessShock
void ProcessShock(RigDef::Shock &def)
Definition: ActorSpawner.cpp:4143
RigDef::CollisionBox
Definition: RigDef_File.h:753
RigDef::Ropable
Definition: RigDef_File.h:1125
RoR::ActorSpawner::ProcessLockgroup
void ProcessLockgroup(RigDef::Lockgroup &lockgroup)
Definition: ActorSpawner.cpp:3257
RoR::ActorSpawner::CreateWheelSkidmarks
void CreateWheelSkidmarks(WheelID_t wheel_index)
Definition: ActorSpawner.cpp:4875
RoR::BEAM_NORMAL
@ BEAM_NORMAL
Definition: SimData.h:71
RoR::ActorSpawner::m_simple_material_base
Ogre::MaterialPtr m_simple_material_base
Definition: ActorSpawner.h:493
RoR::ActorSpawner::ActorSpawnState
Definition: ActorSpawner.h:447
RoR::ActorSpawner::m_flexbodies_parent_scenenode
Ogre::SceneNode * m_flexbodies_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
Definition: ActorSpawner.h:501
RoR::ActorSpawner::FindNodeIndex
NodeNum_t FindNodeIndex(RigDef::Node::Ref &node_ref, bool silent=false)
Definition: ActorSpawner.cpp:3051
RigDef::Airbrake
Definition: RigDef_File.h:457
RoR::ActorSpawner::ProcessCamera
void ProcessCamera(RigDef::Camera &def)
Definition: ActorSpawner.cpp:5476
RigDef::Flare2
Definition: RigDef_File.h:876
RigDef::Help
Definition: RigDef_File.h:948
RoR::ActorSpawner::ProcessContacter
void ProcessContacter(RigDef::Node::Ref &node_ref)
Definition: ActorSpawner.cpp:3447
RoR::ActorSpawner::SetCurrentKeyword
void SetCurrentKeyword(RigDef::Keyword keyword)
Definition: ActorSpawner.h:443
RoR::ActorSpawner::Message::TYPE_INFO
@ TYPE_INFO
RoR::ActorSpawner::ProcessMeshWheel2
void ProcessMeshWheel2(RigDef::MeshWheel2 &def)
Definition: ActorSpawner.cpp:4555
RigDef::Trigger
Definition: RigDef_File.h:1369
RoR::ActorSpawner::ProcessFusedrag
void ProcessFusedrag(RigDef::Fusedrag &def)
Definition: ActorSpawner.cpp:735
RoR::ActorSpawner::ProcessAirbrake
void ProcessAirbrake(RigDef::Airbrake &def)
Definition: ActorSpawner.cpp:875
RoR::ActorSpawner::ProcessTorqueCurve
void ProcessTorqueCurve(RigDef::TorqueCurve &def)
Definition: ActorSpawner.cpp:2832
RigDef::Pistonprop
Definition: RigDef_File.h:1067
RoR::ActorSpawner::CustomMaterial::mirror_prop_scenenode
Ogre::SceneNode * mirror_prop_scenenode
Definition: ActorSpawner.h:141
RoR::ActorSpawner::CustomMaterial
Definition: ActorSpawner.h:113
RigDef::Document::Module
Definition: RigDef_File.h:1479
RoR::ActorSpawner::ComputeWingArea
float ComputeWingArea(Ogre::Vector3 const &ref, Ogre::Vector3 const &x, Ogre::Vector3 const &y, Ogre::Vector3 const &aref)
Definition: ActorSpawner.cpp:1157
RoR::ActorSpawner::m_generate_wing_position_lights
bool m_generate_wing_position_lights
Definition: ActorSpawner.h:462
RoR::ActorSpawner::ConfigureAddonParts
void ConfigureAddonParts(TuneupDefPtr &tuneup_def)
Definition: ActorSpawner.cpp:109
RigDef::FlexBodyWheel
Definition: RigDef_File.h:909
RoR::ActorSpawner::ActorMemoryRequirements::num_beams
size_t num_beams
Definition: ActorSpawner.h:79
RigDef::Particle
Definition: RigDef_File.h:1060
RoR::ActorSpawner::m_flex_factory
RoR::FlexFactory m_flex_factory
Definition: ActorSpawner.h:488
RoR::SimpleInertia
Designed to be run on main/rendering loop (FPS)
Definition: CmdKeyInertia.h:66
RigDef::CameraRail
Definition: RigDef_File.h:732
RoR::ActorSpawner::m_managed_materials
std::map< std::string, Ogre::MaterialPtr > m_managed_materials
Definition: ActorSpawner.h:490
RigDef::WheelPropulsion
WheelPropulsion
Definition: RigDef_File.h:250
RoR::ActorSpawner::SetBeamSpring
void SetBeamSpring(beam_t &beam, float spring)
Definition: ActorSpawner.cpp:6285
RoR::ActorSpawner::ValidateRotator
void ValidateRotator(int id, int axis1, int axis2, NodeNum_t *nodes1, NodeNum_t *nodes2)
Definition: ActorSpawner.cpp:6923
RoR::ActorSpawner::FindVideoCameraByMaterial
RigDef::VideoCamera * FindVideoCameraByMaterial(std::string const &material_name)
Returns NULL if none found.
Definition: ActorSpawner.cpp:6495
RoR::ActorSpawner::CalcMemoryRequirements
void CalcMemoryRequirements(ActorMemoryRequirements &req, RigDef::Document::Module *module_def)
Definition: ActorSpawner.cpp:154
RoR::FlexFactory
Definition: FlexFactory.h:163
RigDef::Hook
Definition: RigDef_File.h:953
RefCountingObjectPtr< TuneupDef >
RigDef::AntiLockBrakes
Definition: RigDef_File.h:599
RoR::ActorSpawner::_ProcessKeyInertia
void _ProcessKeyInertia(RigDef::Inertia &inertia, RigDef::Inertia &inertia_defaults, RoR::CmdKeyInertia &contract_key, RoR::CmdKeyInertia &extend_key)
Definition: ActorSpawner.cpp:3557
RoR::ActorSpawner::GetAndInitFreeNode
node_t & GetAndInitFreeNode(Ogre::Vector3 const &position)
Definition: ActorSpawner.cpp:6278
RoR::ActorSpawner::_ProcessSimpleInertia
void _ProcessSimpleInertia(RigDef::Inertia &def, RoR::SimpleInertia &obj)
Definition: ActorSpawner.cpp:3532
RoR::ActorSpawner::ProcessAxle
void ProcessAxle(RigDef::Axle &def)
Definition: ActorSpawner.cpp:2653
RoR::ActorSpawner::ProcessEngturbo
void ProcessEngturbo(RigDef::Engturbo &def)
Definition: ActorSpawner.cpp:5375
RoR::ActorSpawner
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
Definition: ActorSpawner.h:70
RoR::ActorSpawner::m_cab_trans_material
Ogre::MaterialPtr m_cab_trans_material
Definition: ActorSpawner.h:492
RoR::ActorSpawnRequest
Definition: SimData.h:832
RoR::ActorSpawner::ProcessEngoption
void ProcessEngoption(RigDef::Engoption &def)
Definition: ActorSpawner.cpp:5387
RigDef::Brakes
Definition: RigDef_File.h:703
RigDef::Command2
Definition: RigDef_File.h:763
RoR::ActorSpawner::ActorMemoryRequirements::num_shocks
size_t num_shocks
Definition: ActorSpawner.h:80
RoR::ActorSpawner::CheckCabLimit
bool CheckCabLimit(unsigned int count)
Definition: ActorSpawner.cpp:6190
RigDef::SoundSource2
Definition: RigDef_File.h:1283
RoR::ActorSpawner::ActorMemoryRequirements::num_airbrakes
size_t num_airbrakes
Definition: ActorSpawner.h:83
RoR::ActorSpawner::ProcessShock3
void ProcessShock3(RigDef::Shock3 &def)
Definition: ActorSpawner.cpp:3984
RoR::ActorSpawner::GetActor
ActorPtr GetActor()
Definition: ActorSpawner.h:106
RoR::ActorSpawner::AddMessage
void AddMessage(Message type, Ogre::String const &text)
Maintenance.
Definition: ActorSpawner.cpp:5754
RoR::ActorSpawner::ProcessAnimator
void ProcessAnimator(RigDef::Animator &def)
Definition: ActorSpawner.cpp:3714
RoR::ActorSpawner::CustomMaterial::MirrorPropType::MPROP_NONE
@ MPROP_NONE
RoR::ActorSpawner::SetupNewEntity
void SetupNewEntity(Ogre::Entity *e, Ogre::ColourValue simple_color)
Full texture and material setup.
Definition: ActorSpawner.cpp:6718
RoR::ActorSpawner::InstantiateManagedMaterial
Ogre::MaterialPtr InstantiateManagedMaterial(Ogre::String const &rg_name, Ogre::String const &source_name, Ogre::String const &clone_name)
Definition: ActorSpawner.cpp:2361
RoR::beam_t
Simulation: An edge in the softbody structure.
Definition: SimData.h:330
RoR::ActorSpawner::ProcessShock2
void ProcessShock2(RigDef::Shock2 &def)
Definition: ActorSpawner.cpp:4062
RoR::ActorSpawner::FindOrCreateCustomizedMaterial
Ogre::MaterialPtr FindOrCreateCustomizedMaterial(const std::string &mat_lookup_name, const std::string &mat_lookup_rg)
Definition: ActorSpawner.cpp:6511
RoR::ActorSpawner::CheckParticleLimit
bool CheckParticleLimit(unsigned int count)
Definition: ActorSpawner.cpp:6129
RoR::ActorSpawner::m_oldstyle_renderdash
RoR::Renderdash * m_oldstyle_renderdash
Definition: ActorSpawner.h:494
RoR::ActorSpawner::CreateVideoCamera
void CreateVideoCamera(RigDef::VideoCamera *def)
Definition: ActorSpawner.cpp:7018
RoR::ActorSpawner::ResolveNodeRef
NodeNum_t ResolveNodeRef(RigDef::Node::Ref const &node_ref)
Definition: ActorSpawner.cpp:5785
RoR::ActorSpawner::CheckAeroEngineLimit
bool CheckAeroEngineLimit(unsigned int count)
Definition: ActorSpawner.cpp:6214
RoR::ActorSpawner::ProcessMeshWheel
void ProcessMeshWheel(RigDef::MeshWheel &def)
Definition: ActorSpawner.cpp:4499
DEFAULT_MINIMASS
static const float DEFAULT_MINIMASS
minimum node mass in Kg
Definition: SimConstants.h:54
RoR::ActorSpawner::ProcessRopable
void ProcessRopable(RigDef::Ropable &def)
Definition: ActorSpawner.cpp:2894
RigDef::Engoption
Definition: RigDef_File.h:816
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:52
RigDef::Shock2
Definition: RigDef_File.h:1198
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::ActorSpawner::ActorMemoryRequirements
Definition: ActorSpawner.h:76
RoR::ActorSpawner::AddTyreBeam
unsigned int AddTyreBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
Definition: ActorSpawner.cpp:5253
RoR::ActorSpawner::m_oldstyle_cab_texcoords
std::vector< CabTexcoord > m_oldstyle_cab_texcoords
Definition: ActorSpawner.h:479
RoR::ActorSpawner::ProcessTurboprop2
void ProcessTurboprop2(RigDef::Turboprop2 &def)
Definition: ActorSpawner.cpp:828
RoR::ActorSpawner::TranslateBrakingDef
wheel_t::BrakeCombo TranslateBrakingDef(RigDef::WheelBraking def)
Definition: ActorSpawner.cpp:4468
RoR::ActorSpawner::AddWheel
WheelID_t AddWheel(RigDef::Wheel &wheel)
Definition: ActorSpawner.cpp:4819
RoR::ActorSpawner::ProcessAuthor
void ProcessAuthor(RigDef::Author &def)
Definition: ActorSpawner.cpp:5451
RoR::ActorSpawner::CheckTexcoordLimit
bool CheckTexcoordLimit(unsigned int count)
Definition: ActorSpawner.cpp:6165
keyword
static int keyword
Definition: Bench_TruckParser_IdentifyKeyword.cpp:1448
RoR::ActorSpawner::CreateParticleSystem
Ogre::ParticleSystem * CreateParticleSystem(std::string const &name, std::string const &template_name)
Definition: ActorSpawner.cpp:7247
RigDef::Keyword
Keyword
Definition: RigDef_File.h:65
RoR::ActorSpawner::m_props_parent_scenenode
Ogre::SceneNode * m_props_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
Definition: ActorSpawner.h:500
RoR::ActorSpawner::ConfigureAssetPacks
void ConfigureAssetPacks(ActorPtr actor, RigDef::DocumentPtr def)
Definition: ActorSpawner.cpp:143
RigDef::Wheel2
Definition: RigDef_File.h:1448
RoR::ActorSpawner::ProcessSpeedLimiter
void ProcessSpeedLimiter(RigDef::SpeedLimiter &def)
Definition: ActorSpawner.cpp:2826
RigDef::TractionControl
Definition: RigDef_File.h:1347
RoR::ActorSpawner::m_help_material_name
std::string m_help_material_name
Definition: ActorSpawner.h:470
RoR::ActorSpawner::CustomMaterial::CustomMaterial
CustomMaterial(Ogre::MaterialPtr &mat)
Definition: ActorSpawner.h:129
RoR::ActorSpawner::CustomMaterial::video_camera_def
RigDef::VideoCamera * video_camera_def
Definition: ActorSpawner.h:139
RoR::ActorSpawner::GetWheelAxisNodes
void GetWheelAxisNodes(RigDef::BaseWheel &def, node_t *&out_node_1, node_t *&out_node_2)
Definition: ActorSpawner.cpp:4481
RoR::WheelID_t
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
Definition: ForwardDeclarations.h:56
RoR::ActorSpawner::ProcessFlare3
void ProcessFlare3(RigDef::Flare3 &def)
Definition: ActorSpawner.cpp:2115
RigDef::Cinecam
Definition: RigDef_File.h:742
RoR::ActorSpawner::ProcessNewActor
void ProcessNewActor(ActorPtr actor, ActorSpawnRequest rq, RigDef::DocumentPtr def)
Definition: ActorSpawnerFlow.cpp:59
RoR::ActorSpawner::ProcessFlexbody
void ProcessFlexbody(RigDef::Flexbody &def)
Definition: ActorSpawner.cpp:1516
RoR::ActorSpawner::Message
Message
Definition: ActorSpawner.h:88
RoR::ActorSpawner::CreateCabVisual
void CreateCabVisual()
Definition: ActorSpawner.cpp:7263
RoR::ActorSpawner::FinalizeRig
void FinalizeRig()
Definition: ActorSpawner.cpp:410
RoR::ActorSpawner::ProcessFixedNode
void ProcessFixedNode(RigDef::Node::Ref node_ref)
Definition: ActorSpawner.cpp:1272
RoR::ActorSpawner::HandleException
void HandleException()
Definition: ActorSpawner.cpp:7224
RoR::ActorSpawner::GetAndInitFreeBeam
beam_t & GetAndInitFreeBeam(node_t &node_1, node_t &node_2)
Definition: ActorSpawner.cpp:6270
RoR::ActorSpawner::ProcessScrewprop
void ProcessScrewprop(RigDef::Screwprop &def)
Definition: ActorSpawner.cpp:717
RoR::ActorSpawner::m_material_substitutions
std::map< std::string, CustomMaterial > m_material_substitutions
Maps original material names (shared) to their actor-specific substitutes; There's 1 substitute per 1...
Definition: ActorSpawner.h:489
RigDef::MeshWheel
Definition: RigDef_File.h:1043
RigDef::ManagedMaterial
Definition: RigDef_File.h:1021
RoR::ActorSpawner::AddWheelBeam
unsigned int AddWheelBeam(node_t *node_1, node_t *node_2, float spring, float damping, std::shared_ptr< RigDef::BeamDefaults > beam_defaults, float max_contraction=-1.f, float max_extension=-1.f, BeamType type=BEAM_NORMAL)
'wheels', 'meshwheels', 'meshwheels2'
Definition: ActorSpawner.cpp:5217
RoR::ActorSpawner::m_actor
ActorPtr m_actor
Definition: ActorSpawner.h:455
RigDef::InterAxle
Definition: RigDef_File.h:999
RigDef::BaseWheel
Definition: RigDef_File.h:408
RoR::ActorSpawner::m_named_nodes
std::map< Ogre::String, unsigned int > m_named_nodes
Definition: ActorSpawner.h:483
RoR::ActorSpawner::Message::TYPE_WARNING
@ TYPE_WARNING
RoR::ActorSpawner::FinalizeGfxSetup
void FinalizeGfxSetup()
Definition: ActorSpawner.cpp:6776
Application.h
Central state/object manager and communications hub.
RoR::ActorSpawner::ProcessBeam
void ProcessBeam(RigDef::Beam &def)
Definition: ActorSpawner.cpp:5506
RoR::ActorSpawner::AddNode
std::pair< unsigned int, bool > AddNode(RigDef::Node::Id &id)
Definition: ActorSpawner.cpp:5849
RoR::ActorSpawner::AddWheelRimBeam
unsigned int AddWheelRimBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
Definition: ActorSpawner.cpp:5244
RoR::ActorSpawner::m_fuse_z_max
float m_fuse_z_max
Definition: ActorSpawner.h:475
RoR::ActorSpawner::CustomMaterial::MirrorPropType
MirrorPropType
Definition: ActorSpawner.h:115
RigDef::Keyword::INVALID
@ INVALID
RoR::ActorSpawner::ProcessCollisionRange
void ProcessCollisionRange(RigDef::CollisionRange &def)
Definition: ActorSpawner.cpp:2629
RoR::node_t
Physics: A vertex in the softbody structure.
Definition: SimData.h:286
RigDef::Submesh
Definition: RigDef_File.h:1299
RoR::ActorSpawner::GetCurrentElementMediaRG
std::string GetCurrentElementMediaRG()
Where to load media from (the addonpart's bundle or vehicle's bundle?)
Definition: ActorSpawner.cpp:7400
RoR::ActorSpawner::ActorSpawnState::global_minimass
float global_minimass
'minimass' - used where 'set_default_minimass' is not applied.
Definition: ActorSpawner.h:450
RoR::ActorSpawner::AdjustNodeBuoyancy
void AdjustNodeBuoyancy(node_t &node, RigDef::Node &node_def, std::shared_ptr< RigDef::NodeDefaults > defaults)
For user-defined nodes.
Definition: ActorSpawner.cpp:4751
RoR::ActorSpawner::ProcessNode
void ProcessNode(RigDef::Node &def)
Definition: ActorSpawner.cpp:5893
RigDef::Inertia
Definition: RigDef_File.h:441
RoR::wheel_t::BrakeCombo
BrakeCombo
Wheels are braked by three mechanisms: A footbrake, a handbrake/parkingbrake, and directional brakes ...
Definition: SimData.h:423
RoR::ActorSpawner::m_managedmat_placeholder_template
Ogre::MaterialPtr m_managedmat_placeholder_template
An 'error marker' material (bright magenta) to generate managedmaterial placeholders from.
Definition: ActorSpawner.h:491
RoR::ActorSpawner::m_wing_area
float m_wing_area
Definition: ActorSpawner.h:471
RigDef::Shock
Definition: RigDef_File.h:1180
RoR::CmdKeyInertia
Designed to be run in physics loop (2khz)
Definition: CmdKeyInertia.h:45
RoR::ActorSpawner::CreateMirrorPropVideoCam
void CreateMirrorPropVideoCam(Ogre::MaterialPtr custom_mat, CustomMaterial::MirrorPropType type, Ogre::SceneNode *prop_scenenode)
Definition: ActorSpawner.cpp:7153
RoR::ActorSpawner::ProcessSlidenode
void ProcessSlidenode(RigDef::SlideNode &def)
Definition: ActorSpawner.cpp:2978
RoR::ActorSpawner::m_fuse_y_max
float m_fuse_y_max
Definition: ActorSpawner.h:477
RoR::ActorSpawner::ProcessRailGroup
void ProcessRailGroup(RigDef::RailGroup &def)
Definition: ActorSpawner.cpp:2971
RoR::Renderdash
'renderdash' is a name of a classic Render-To-Texture animated material with gauges and other dashboa...
Definition: Renderdash.h:34
RoR::ActorSpawner::m_flares_parent_scenenode
Ogre::SceneNode * m_flares_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
Definition: ActorSpawner.h:502
RoR::ActorSpawner::CustomMaterial::MirrorPropType::MPROP_LEFT
@ MPROP_LEFT
RigDef::MaterialFlareBinding
Definition: RigDef_File.h:1031
RoR::ActorSpawner::SetBeamStrength
void SetBeamStrength(beam_t &beam, float strength)
Definition: ActorSpawner.cpp:3897
RigDef::SpeedLimiter
Definition: RigDef_File.h:1291
RoR::ActorSpawner::CheckSoundScriptLimit
static bool CheckSoundScriptLimit(ActorPtr const &vehicle, unsigned int count)
Definition: ActorSpawner.cpp:6178
RoR::ActorSpawner::ProcessDescription
void ProcessDescription(Ogre::String const &line)
Definition: ActorSpawner.cpp:849
RoR::ActorSpawner::m_cab_material_name
std::string m_cab_material_name
Original name defined in truckfile/globals.
Definition: ActorSpawner.h:469
RoR::ActorSpawner::ProcessInterAxle
void ProcessInterAxle(RigDef::InterAxle &def)
Definition: ActorSpawner.cpp:2719
RigDef::Lockgroup
Definition: RigDef_File.h:1006
RoR::ActorSpawner::ProcessParticle
void ProcessParticle(RigDef::Particle &def)
Definition: ActorSpawner.cpp:2857
RoR::ActorSpawner::ProcessCollisionBox
void ProcessCollisionBox(RigDef::CollisionBox &def)
Definition: ActorSpawner.cpp:2604
RigDef::Animator
Definition: RigDef_File.h:556
RoR::ActorSpawner::m_state
ActorSpawnState m_state
Definition: ActorSpawner.h:468
RoR::ActorSpawner::ActorMemoryRequirements::num_nodes
size_t num_nodes
Definition: ActorSpawner.h:78
RoR::ActorSpawner::Exception::Exception
Exception(Ogre::String const &message)
Definition: ActorSpawner.h:146
RigDef::Flexbody
Definition: RigDef_File.h:895
RoR::ActorSpawner::ProcessTie
void ProcessTie(RigDef::Tie &def)
Definition: ActorSpawner.cpp:2906
RoR::ActorSpawner::CreateMeshWheelVisuals
void CreateMeshWheelVisuals(WheelID_t wheel_id, NodeNum_t base_node_index, NodeNum_t axis_node_1_index, NodeNum_t axis_node_2_index, unsigned int num_rays, WheelSide side, Ogre::String mesh_name, Ogre::String mesh_rg, Ogre::String material_name, Ogre::String material_rg, float rim_radius)
Definition: ActorSpawner.cpp:4620
RoR::ActorSpawner::UpdateCollcabContacterNodes
void UpdateCollcabContacterNodes()
Definition: ActorSpawner.cpp:6455
RigDef::VideoCamera
Definition: RigDef_File.h:1417
RigDef::TransferCase
Definition: RigDef_File.h:1360
RoR::ActorSpawner::SetBeamDamping
void SetBeamDamping(beam_t &beam, float damping)
Definition: ActorSpawner.cpp:6290
RoR::ActorSpawner::m_curr_mirror_prop_scenenode
Ogre::SceneNode * m_curr_mirror_prop_scenenode
Definition: ActorSpawner.h:496
RigDef::Turboprop2
Definition: RigDef_File.h:1407
RoR::ActorSpawner::CheckAxleLimit
bool CheckAxleLimit(unsigned int count)
Definition: ActorSpawner.cpp:6141
RoR::ActorSpawner::CollectNodesFromRanges
bool CollectNodesFromRanges(std::vector< RigDef::Node::Range > &node_ranges, std::vector< NodeNum_t > &out_node_indices)
Parses list of node-ranges into list of individual nodes.
Definition: ActorSpawner.cpp:3063
RoR::ActorSpawner::ProcessSoundSource2
void ProcessSoundSource2(RigDef::SoundSource2 &def)
Definition: ActorSpawner.cpp:1162
RoR::ActorSpawner::ProcessAntiLockBrakes
void ProcessAntiLockBrakes(RigDef::AntiLockBrakes &def)
Definition: ActorSpawner.cpp:5333
RoR::ActorSpawner::BuildWheelObjectAndNodes
void BuildWheelObjectAndNodes(WheelID_t wheel_id, unsigned int num_rays, node_t *axis_node_1, node_t *axis_node_2, node_t *reference_arm_node, unsigned int reserve_nodes, unsigned int reserve_beams, float wheel_radius, RigDef::WheelPropulsion propulsion, RigDef::WheelBraking braking, std::shared_ptr< RigDef::NodeDefaults > node_defaults, float wheel_mass, float wheel_width=-1.f)
Sets up wheel and builds nodes for sections 'wheels', 'meshwheels' and 'meshwheels2'.
Definition: ActorSpawner.cpp:4668
RoR::ActorSpawner::ProcessWheel
void ProcessWheel(RigDef::Wheel &def)
Definition: ActorSpawner.cpp:5281
RoR::ActorSpawner::ProcessCameraRail
void ProcessCameraRail(RigDef::CameraRail &def)
Definition: ActorSpawner.cpp:1216
RoR::ActorSpawner::AddSoundSourceInstance
static void AddSoundSourceInstance(ActorPtr const &vehicle, Ogre::String const &sound_script_name, int node_index, int type=-2)
Definition: ActorSpawner.cpp:1179
RoR::ActorSpawner::WashCalculator
void WashCalculator()
Definition: ActorSpawner.cpp:619
RoR::ActorSpawner::m_airplane_left_light
int m_airplane_left_light
Definition: ActorSpawner.h:472
RoR::ActorSpawner::ProcessExhaust
void ProcessExhaust(RigDef::Exhaust &def)
Definition: ActorSpawner.cpp:1278
RoR::ActorSpawner::CustomMaterial::mirror_prop_type
MirrorPropType mirror_prop_type
Definition: ActorSpawner.h:140
RigDef::Tie
Definition: RigDef_File.h:1313
RigDef::Node::Id
Abstract node ID (numbered or named) Node name is always available.
Definition: RigDef_Node.h:44
RigDef::WheelDetacher
Definition: RigDef_File.h:1456
RigDef::Rotator
Definition: RigDef_File.h:1141
RoR::Message
Unified game event system - all requests and state changes are reported using a message.
Definition: GameContext.h:51
RoR::ActorSpawner::GetNodePointer
node_t * GetNodePointer(RigDef::Node::Ref const &node_ref)
Definition: ActorSpawner.cpp:5824
RoR::ActorSpawner::ProcessProp
void ProcessProp(RigDef::Prop &def)
Resource group override is used with addonparts.
Definition: ActorSpawner.cpp:1586
RigDef::Fusedrag
Definition: RigDef_File.h:918
RigDef::Engine
Definition: RigDef_File.h:805
RoR::ActorSpawner::Message::TYPE_ERROR
@ TYPE_ERROR
RigDef_Parser.h
Checks the rig-def file syntax and loads data to memory.
RoR::ActorSpawner::ProcessPistonprop
void ProcessPistonprop(RigDef::Pistonprop &def)
Definition: ActorSpawner.cpp:854
RoR::ActorSpawner::m_fuse_y_min
float m_fuse_y_min
Definition: ActorSpawner.h:476
RoR::ActorSpawner::CreateWheelVisuals
void CreateWheelVisuals(WheelID_t wheel_id, NodeNum_t node_base_index, unsigned int def_num_rays, Ogre::String const &face_material_name, Ogre::String const &face_material_rg, Ogre::String const &band_material_name, Ogre::String const &band_material_rg, bool separate_rim, float rim_ratio=1.f)
Definition: ActorSpawner.cpp:5104
RoR::ActorSpawner::GetFreeShock
shock_t & GetFreeShock()
Definition: ActorSpawner.cpp:6263
RoR::ActorSpawner::ProcessTurbojet
void ProcessTurbojet(RigDef::Turbojet &def)
Definition: ActorSpawner.cpp:660
RoR::ActorSpawner::CalculateBeamLength
void CalculateBeamLength(beam_t &beam)
Definition: ActorSpawner.cpp:5738
RoR::ActorSpawner::m_spawn_position
Ogre::Vector3 m_spawn_position
Definition: ActorSpawner.h:459
RoR::ActorSpawner::ProcessCruiseControl
void ProcessCruiseControl(RigDef::CruiseControl &def)
Definition: ActorSpawner.cpp:2814
RigDef::Rotator2
Definition: RigDef_File.h:1155
RoR::ActorSpawner::InitializeRig
void InitializeRig()
Definition: ActorSpawner.cpp:252
RoR::ActorSpawner::CreateRail
RailGroup * CreateRail(std::vector< RigDef::Node::Range > &node_ranges)
Definition: ActorSpawner.cpp:3123
RoR::ActorSpawner::m_first_wing_index
int m_first_wing_index
Definition: ActorSpawner.h:478
RigDef::Shock3
Definition: RigDef_File.h:1224
RigDef::Exhaust
Definition: RigDef_File.h:851
RoR::ActorSpawner::m_wheels_parent_scenenode
Ogre::SceneNode * m_wheels_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
Definition: ActorSpawner.h:499
RoR::ActorSpawner::CustomMaterial::material_flare_def
RigDef::MaterialFlareBinding * material_flare_def
Definition: ActorSpawner.h:138
RoR::ActorSpawner::m_apply_simple_materials
bool m_apply_simple_materials
Definition: ActorSpawner.h:460
RigDef::Axle
Definition: RigDef_File.h:620
RoR::ActorSpawner::GetFreeNode
node_t & GetFreeNode()
Definition: ActorSpawner.cpp:6248
RoR::ActorSpawner::ProcessRotator2
void ProcessRotator2(RigDef::Rotator2 &def)
Definition: ActorSpawner.cpp:3489
RoR::ActorSpawner::CreateMaterialFlare
void CreateMaterialFlare(int flare_index, Ogre::MaterialPtr mat)
Definition: ActorSpawner.cpp:7379
RoR::ActorSpawner::CreateFlexBodyWheelVisuals
void CreateFlexBodyWheelVisuals(WheelID_t wheel_id, NodeNum_t node_base_index, NodeNum_t axis_node_1, NodeNum_t axis_node_2, int num_rays, float radius, WheelSide side, std::string rim_mesh_name, std::string rim_mesh_rg, std::string tire_mesh_name, std::string tire_mesh_rg)
Definition: ActorSpawner.cpp:5152
RoR::ActorSpawner::CreateBeamVisuals
void CreateBeamVisuals(beam_t const &beam, int beam_index, bool visible, std::shared_ptr< RigDef::BeamDefaults > const &beam_defaults, std::string material_override="")
Definition: ActorSpawner.cpp:5682
RoR::ActorSpawner::ActorMemoryRequirements::num_wings
size_t num_wings
Definition: ActorSpawner.h:82
RoR::ActorSpawner::SetupDefaultSoundSources
static void SetupDefaultSoundSources(ActorPtr const &actor)
Definition: ActorSpawner.cpp:6295
RoR::ActorSpawner::AssignWheelToAxle
bool AssignWheelToAxle(int &_out_axle_wheel, node_t *axis_node_1, node_t *axis_node_2)
Finds wheel with given axle nodes and returns it's index.
Definition: ActorSpawner.cpp:2637
RoR::ActorSpawner::m_curr_mirror_prop_type
CustomMaterial::MirrorPropType m_curr_mirror_prop_type
Definition: ActorSpawner.h:495
RoR::ActorSpawner::BuildAeroEngine
void BuildAeroEngine(NodeNum_t ref_node_index, NodeNum_t back_node_index, NodeNum_t blade_1_node_index, NodeNum_t blade_2_node_index, NodeNum_t blade_3_node_index, NodeNum_t blade_4_node_index, NodeNum_t couplenode_index, bool is_turboprops, Ogre::String const &airfoil, float power, float pitch)
Definition: ActorSpawner.cpp:773
RoR::ActorSpawner::_SectionWheels2AddBeam
unsigned int _SectionWheels2AddBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
Definition: ActorSpawner.cpp:5265
RigDef::Node
Definition: RigDef_Node.h:39
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: RigDef_Prerequisites.h:38
RoR::ActorSpawner::ProcessCommand
void ProcessCommand(RigDef::Command2 &def)
Definition: ActorSpawner.cpp:3613
FlexObj.h
RigDef::SoundSource
Definition: RigDef_File.h:1277
RoR::WheelSide
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
Definition: GfxData.h:115
RoR::ActorSpawner::GetNodeIndexOrThrow
NodeNum_t GetNodeIndexOrThrow(RigDef::Node::Ref const &id)
Definition: ActorSpawner.cpp:5464
RoR::ActorSpawner::m_memory_requirements
ActorMemoryRequirements m_memory_requirements
Definition: ActorSpawner.h:463
RoR::ActorSpawner::GetSubmeshGroundmodelName
std::string GetSubmeshGroundmodelName()
Definition: ActorSpawner.cpp:1320
RoR::ActorSpawner::m_airplane_right_light
int m_airplane_right_light
Definition: ActorSpawner.h:473
RoR::ActorSpawner::AddBeam
beam_t & AddBeam(node_t &node_1, node_t &node_2, std::shared_ptr< RigDef::BeamDefaults > &defaults, int detacher_group)
Definition: ActorSpawner.cpp:3872
RoR::ActorSpawner::ProcessWheelDetacher
void ProcessWheelDetacher(RigDef::WheelDetacher &def)
Definition: ActorSpawner.cpp:5286
RoR::ActorSpawner::InitBeam
void InitBeam(beam_t &beam, node_t *node_1, node_t *node_2)
Definition: ActorSpawner.cpp:5745
FlexFactory.h
RoR::ActorSpawner::AssignManagedMaterialTexture
void AssignManagedMaterialTexture(Ogre::TextureUnitState *tus, const std::string &mm_name, int media_id, const std::string &tex_name)
Helper for ProcessManagedMaterial()
Definition: ActorSpawner.cpp:7415
RoR::ActorSpawner::CustomMaterial::CustomMaterial
CustomMaterial()
Definition: ActorSpawner.h:122
RigDef::Minimass
Definition: RigDef_File.h:1037
RigDef::Turbojet
Definition: RigDef_File.h:1394
RoR::ActorSpawner::ProcessFlexBodyWheel
void ProcessFlexBodyWheel(RigDef::FlexBodyWheel &def)
Definition: ActorSpawner.cpp:4199
RoR::ActorSpawner::FindBeamInRig
beam_t * FindBeamInRig(NodeNum_t node_a, NodeNum_t node_b)
Definition: ActorSpawner.cpp:3169
RoR::ActorSpawner::ProcessTractionControl
void ProcessTractionControl(RigDef::TractionControl &def)
Definition: ActorSpawner.cpp:5300
RoR::ActorSpawner::GetBeamNodePointer
node_t * GetBeamNodePointer(RigDef::Node::Ref const &node_ref)
Definition: ActorSpawner.cpp:5496
RoR::ActorSpawner::CreateSimpleMaterial
Ogre::MaterialPtr CreateSimpleMaterial(Ogre::ColourValue color)
Definition: ActorSpawner.cpp:6707
RigDef::Beam
Definition: RigDef_File.h:626
RigDef::Screwprop
Definition: RigDef_File.h:1162
RoR::ActorSpawner::GetMemoryRequirements
ActorMemoryRequirements const & GetMemoryRequirements()
Definition: ActorSpawner.h:107
RoR::ActorSpawner::GetFreeBeam
beam_t & GetFreeBeam()
Definition: ActorSpawner.cpp:6256
RoR::ActorSpawner::ProcessTrigger
void ProcessTrigger(RigDef::Trigger &def)
Definition: ActorSpawner.cpp:3268
RigDef::CruiseControl
Definition: RigDef_File.h:789
RigDef::WheelBraking
WheelBraking
Definition: RigDef_File.h:241
RigDef::Wing
Definition: RigDef_File.h:1462
RoR
Definition: AppContext.h:36
RoR::ActorSpawner::m_selected_modules
std::list< std::shared_ptr< RigDef::Document::Module > > m_selected_modules
Definition: ActorSpawner.h:458
x
float x
Definition: (ValueTypes) quaternion.h:5
RoR::ActorSpawner::ProcessTransferCase
void ProcessTransferCase(RigDef::TransferCase &def)
Definition: ActorSpawner.cpp:2776
RoR::ActorSpawner::GetNodePointerOrThrow
node_t * GetNodePointerOrThrow(RigDef::Node::Ref const &node_ref)
Definition: ActorSpawner.cpp:5837
RigDef::Globals
Definition: RigDef_File.h:930
RigDef::ExtCamera
Definition: RigDef_File.h:858
RigDef::Rope
Definition: RigDef_File.h:1132
RoR::ActorSpawner::ProcessCinecam
void ProcessCinecam(RigDef::Cinecam &def)
Definition: ActorSpawner.cpp:6052
RoR::ActorSpawner::CustomMaterial::material
Ogre::MaterialPtr material
Definition: ActorSpawner.h:137
RoR::ActorSpawner::InitNode
void InitNode(node_t &node, Ogre::Vector3 const &position)
Definition: ActorSpawner.cpp:6082
RigDef::SlideNode
Definition: RigDef_File.h:1257
RigDef::MeshWheel2
Definition: RigDef_File.h:1046
RoR::ActorSpawner::ProcessManagedMaterial
void ProcessManagedMaterial(RigDef::ManagedMaterial &def)
Definition: ActorSpawner.cpp:2375
RigDef::TorqueCurve
Definition: RigDef_File.h:1330
RoR::ActorSpawner::Exception
Definition: ActorSpawner.h:144
RoR::ActorSpawner::ProcessWheel2
void ProcessWheel2(RigDef::Wheel2 &def)
Definition: ActorSpawner.cpp:5276
RoR::ActorSpawner::m_oldstyle_cab_submeshes
std::vector< CabSubmesh > m_oldstyle_cab_submeshes
Definition: ActorSpawner.h:480
RoR::shock_t
Definition: SimData.h:368
RoR::ActorSpawner::CheckScrewpropLimit
bool CheckScrewpropLimit(unsigned int count)
Definition: ActorSpawner.cpp:6226