RigsofRods
Soft-body Physics Simulation
ActorSpawnerFlow.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 
22 /*
23  @file
24  @brief Implements part of ActorSpawner class. Code separated for easier debugging.
25  @author Petr Ohlidal
26  @date 12/2013
27 */
28 
29 #include "ActorSpawner.h"
30 
31 #include "Actor.h"
32 #include "CacheSystem.h"
33 #include "GfxScene.h"
34 #include "Renderdash.h"
35 
36 using namespace RoR;
37 
38 #define PROCESS_ELEMENT(_KEYWORD_, _FIELD_, _FUNCTION_) \
39 { \
40  this->SetCurrentKeyword(_KEYWORD_); \
41  for (auto& m: m_selected_modules) \
42  { \
43  m_current_module = m; \
44  for (auto& entry: m->_FIELD_) \
45  { \
46  try { \
47  _FUNCTION_(entry); \
48  } \
49  catch (...) \
50  { \
51  this->HandleException(); \
52  } \
53  } \
54  m_current_module.reset(); \
55  } \
56  this->SetCurrentKeyword(RigDef::Keyword::INVALID); \
57 }
58 
60 {
61  m_actor = actor;
62  m_file = def;
63  m_custom_resource_group = rq.asr_cache_entry->resource_group; // For historical/backwards-compat reasons, the instances live in the same group as the bundle.
64 
65  // Under OGRE, every scenenode must have globally unique name.
66  m_actor_grouping_scenenode = App::GetGfxScene()->GetSceneManager()->getRootSceneNode()->createChildSceneNode(this->ComposeName("Actor"));
67  m_particles_parent_scenenode = m_actor_grouping_scenenode->createChildSceneNode(this->ComposeName("Particles"));
68  m_wheels_parent_scenenode = m_actor_grouping_scenenode->createChildSceneNode(this->ComposeName("Wheels"));
69  m_flexbodies_parent_scenenode = m_actor_grouping_scenenode->createChildSceneNode(this->ComposeName("Flexbodies"));
70  m_props_parent_scenenode = m_actor_grouping_scenenode->createChildSceneNode(this->ComposeName("Props"));
71  m_flares_parent_scenenode = m_actor_grouping_scenenode->createChildSceneNode(this->ComposeName("Flares"));
72 
75  m_wing_area = 0.f;
76  m_fuse_z_min = 1000.0f;
77  m_fuse_z_max = -1000.0f;
78  m_fuse_y_min = 1000.0f;
79  m_fuse_y_max = -1000.0f;
80  m_first_wing_index = -1;
81 
83 
84  if (m_file->root_module->engine.size() > 0) // Engine present => it's a land vehicle.
85  {
86  m_generate_wing_position_lights = false; // Disable aerial pos. lights for land vehicles.
87  }
88 
89  // Create the built-in "renderdash" material for use in meshes.
90  // Must be done before 'props' are processed because those traditionally use it.
91  // Must be always created, there is no mechanism to declare the need for it. It can be acessed from any mesh, not only dashboard-prop.
92  // Example content: https://github.com/RigsOfRods/rigs-of-rods/files/3044343/45fc291a9d2aa5faaa36cca6df9571cd6d1f1869_Actros_8x8-englisch.zip
93  // TODO: Move setup to GfxActor
95  m_custom_resource_group, this->ComposeName("RenderdashTex", 0), this->ComposeName("RenderdashCam", 0));
96 
97  this->InitializeRig();
98 
99  // Vehicle name
100  m_actor->ar_design_name = m_file->name;
101 
102  // File hash
103  m_actor->ar_filehash = m_file->hash;
104 
105  // Flags in root module
106  m_actor->ar_forward_commands = m_file->forward_commands;
107  m_actor->ar_import_commands = m_file->import_commands;
108  m_actor->ar_rescuer_flag = m_file->rescuer;
109  m_actor->m_disable_default_sounds = m_file->disable_default_sounds;
110  m_actor->ar_hide_in_actor_list = m_file->hide_in_chooser;
111 
115 
116  // 'guid': unused for gameplay
117  if (m_file->root_module->guid.empty())
118  {
119  this->AddMessage(Message::TYPE_WARNING, "vehicle uses no GUID, skinning will be impossible");
120  }
121 
123  // This prepares substitute materials -> MUST be processed before any meshes are loaded.
126  // MUST be done before "guisettings" (overrides help panel material)
134 
135  // ---------------------------- User-defined nodes ----------------------------
136 
137  m_actor->m_gfx_actor = std::unique_ptr<RoR::GfxActor>(
139 
141 
142  // Old-format exhaust (defined by flags 'x/y' in section 'nodes', one per vehicle)
144  {
146  }
147 
148  // ---------------------------- Node generating sections ----------------------------
149 
151 
152  // ---------------------------- Wheels (also generate nodes) ----------------------------
153 
159 
160  // ---------------------------- WheelDetachers ----------------------------
161 
163 
164  // ---------------------------- User-defined beams ----------------------------
165  // (may reference any generated/user-defined node)
166 
171  PROCESS_ELEMENT(RigDef::Keyword::COMMANDS2, commands2, ProcessCommand); // 'commands' are auto-imported as 'commands2'.
175 
176  // ---------------------------- Other ----------------------------
177 
208  PROCESS_ELEMENT(RigDef::Keyword::TURBOPROPS2, turboprops2, ProcessTurboprop2); // 'turboprops' are auto-imported as 'turboprops2'.
211  PROCESS_ELEMENT(RigDef::Keyword::FLEXBODIES, flexbodies, ProcessFlexbody); // (needs GfxActor to exist)
212  PROCESS_ELEMENT(RigDef::Keyword::WINGS, wings, ProcessWing); // (needs GfxActor to exist)
213  PROCESS_ELEMENT(RigDef::Keyword::AIRBRAKES, airbrakes, ProcessAirbrake); // (needs GfxActor to exist)
214 
215 #ifdef USE_OPENAL
216 
219 
220 #endif // USE_OPENAL
221 
222  this->FinalizeRig();
223 
224  if (m_oldstyle_cab_texcoords.size() > 0 && m_actor->ar_num_cabs > 0)
225  {
226  this->CreateCabVisual();
227  };
228 
229  this->FinalizeGfxSetup();
230 }
RigDef::Keyword::SUBMESH
@ SUBMESH
RoR::ActorSpawner::ProcessWing
void ProcessWing(RigDef::Wing &def)
Definition: ActorSpawner.cpp:920
RigDef::Keyword::CAMERARAIL
@ CAMERARAIL
RigDef::Keyword::AUTHOR
@ AUTHOR
RigDef::Keyword::SOUNDSOURCES
@ SOUNDSOURCES
RigDef::Keyword::ANTILOCKBRAKES
@ ANTILOCKBRAKES
RigDef::Keyword::ENGINE
@ ENGINE
RoR::ActorSpawner::ProcessHook
void ProcessHook(RigDef::Hook &def)
Definition: ActorSpawner.cpp:3187
RigDef::Keyword::SHOCKS
@ SHOCKS
RoR::ActorSpawner::ProcessHydro
void ProcessHydro(RigDef::Hydro &def)
Definition: ActorSpawner.cpp:3902
RoR::ActorSpawner::m_current_keyword
RigDef::Keyword m_current_keyword
For error reports.
Definition: ActorSpawner.h:481
RigDef::Keyword::ROTATORS
@ ROTATORS
RigDef::Keyword::WINGS
@ WINGS
RoR::ActorSpawner::ProcessSubmesh
void ProcessSubmesh(RigDef::Submesh &def)
Definition: ActorSpawner.cpp:1334
RoR::ActorSpawner::ProcessGlobals
void ProcessGlobals(RigDef::Globals &def)
Definition: ActorSpawner.cpp:6101
RigDef::Keyword::COMMANDS2
@ COMMANDS2
RoR::ActorSpawner::m_custom_resource_group
std::string m_custom_resource_group
Definition: ActorSpawner.h:461
RoR::ActorSpawner::ProcessFlare2
void ProcessFlare2(RigDef::Flare2 &def)
Definition: ActorSpawner.cpp:2126
RoR::ActorSpawner::ProcessRope
void ProcessRope(RigDef::Rope &def)
Definition: ActorSpawner.cpp:2944
RoR::ActorSpawner::ProcessSoundSource
void ProcessSoundSource(RigDef::SoundSource &def)
Definition: ActorSpawner.cpp:1204
RigDef::Keyword::MINIMASS
@ MINIMASS
RigDef::Keyword::ANIMATORS
@ ANIMATORS
RigDef::Keyword::TRACTIONCONTROL
@ TRACTIONCONTROL
RigDef::Keyword::ROPES
@ ROPES
RigDef::Keyword::GUISETTINGS
@ GUISETTINGS
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
RigDef::Keyword::WHEELDETACHERS
@ WHEELDETACHERS
RoR::ActorSpawner::ProcessBrakes
void ProcessBrakes(RigDef::Brakes &def)
Definition: ActorSpawner.cpp:5365
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
Renderdash.h
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::AddExhaust
void AddExhaust(NodeNum_t emitter_node_idx, NodeNum_t direction_node_idx)
Definition: ActorSpawner.cpp:6018
RoR::ActorSpawner::ProcessShock
void ProcessShock(RigDef::Shock &def)
Definition: ActorSpawner.cpp:4143
RoR::ActorSpawner::ProcessLockgroup
void ProcessLockgroup(RigDef::Lockgroup &lockgroup)
Definition: ActorSpawner.cpp:3257
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::ProcessCamera
void ProcessCamera(RigDef::Camera &def)
Definition: ActorSpawner.cpp:5476
RigDef::Keyword::ENGOPTION
@ ENGOPTION
RoR::ActorSpawner::ProcessContacter
void ProcessContacter(RigDef::Node::Ref &node_ref)
Definition: ActorSpawner.cpp:3447
RigDef::Keyword::TURBOPROPS2
@ TURBOPROPS2
RoR::ActorSpawner::ProcessMeshWheel2
void ProcessMeshWheel2(RigDef::MeshWheel2 &def)
Definition: ActorSpawner.cpp:4555
RoR::ActorSpawner::ProcessFusedrag
void ProcessFusedrag(RigDef::Fusedrag &def)
Definition: ActorSpawner.cpp:735
RigDef::Keyword::TIES
@ TIES
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::Keyword::MESHWHEELS
@ MESHWHEELS
RoR::CacheEntry::resource_group
Ogre::String resource_group
Resource group of the loaded bundle. Empty if not loaded yet.
Definition: CacheSystem.h:89
RoR::ActorSpawner::m_generate_wing_position_lights
bool m_generate_wing_position_lights
Definition: ActorSpawner.h:462
RigDef::Keyword::HELP
@ HELP
RoR::Actor::ar_num_cabs
int ar_num_cabs
Definition: Actor.h:334
RoR::Actor::ar_hide_in_actor_list
bool ar_hide_in_actor_list
Hide in list of spawned actors (available in top menubar). Useful for fixed-place machinery,...
Definition: Actor.h:345
RigDef::Keyword::AIRBRAKES
@ AIRBRAKES
RigDef::Keyword::SET_COLLISION_RANGE
@ SET_COLLISION_RANGE
RigDef::Keyword::EXTCAMERA
@ EXTCAMERA
RefCountingObjectPtr< Actor >
ActorSpawner.h
Vehicle spawning logic.
RoR::Actor::ar_forward_commands
bool ar_forward_commands
Sim state.
Definition: Actor.h:480
Actor.h
RoR::ActorSpawner::ProcessAxle
void ProcessAxle(RigDef::Axle &def)
Definition: ActorSpawner.cpp:2653
RoR::GfxScene::GetSceneManager
Ogre::SceneManager * GetSceneManager()
Definition: GfxScene.h:64
RoR::ActorSpawner::ProcessEngturbo
void ProcessEngturbo(RigDef::Engturbo &def)
Definition: ActorSpawner.cpp:5375
RoR::ActorSpawnRequest
Definition: SimData.h:832
RoR::ActorSpawner::ProcessEngoption
void ProcessEngoption(RigDef::Engoption &def)
Definition: ActorSpawner.cpp:5387
RigDef::Keyword::WHEELS
@ WHEELS
RoR::ActorSpawner::ProcessShock3
void ProcessShock3(RigDef::Shock3 &def)
Definition: ActorSpawner.cpp:3984
RigDef::Keyword::FLARES2
@ FLARES2
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
RigDef::Keyword::SHOCKS2
@ SHOCKS2
RoR::Actor::m_disable_default_sounds
bool m_disable_default_sounds
Spawner context; TODO: remove.
Definition: Actor.h:633
RoR::ActorSpawner::ProcessShock2
void ProcessShock2(RigDef::Shock2 &def)
Definition: ActorSpawner.cpp:4062
RigDef::Keyword::CONTACTERS
@ CONTACTERS
RoR::ActorSpawner::m_oldstyle_renderdash
RoR::Renderdash * m_oldstyle_renderdash
Definition: ActorSpawner.h:494
RigDef::Keyword::TRANSFERCASE
@ TRANSFERCASE
RoR::ActorSpawner::ProcessMeshWheel
void ProcessMeshWheel(RigDef::MeshWheel &def)
Definition: ActorSpawner.cpp:4499
RigDef::Keyword::BEAMS
@ BEAMS
RigDef::Keyword::TRIGGERS
@ TRIGGERS
RigDef::Keyword::MANAGEDMATERIALS
@ MANAGEDMATERIALS
RoR::ActorSpawner::ProcessRopable
void ProcessRopable(RigDef::Ropable &def)
Definition: ActorSpawner.cpp:2894
RigDef::Keyword::FUSEDRAG
@ FUSEDRAG
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
RigDef::Keyword::COLLISIONBOXES
@ COLLISIONBOXES
RoR::ActorSpawner::ProcessAuthor
void ProcessAuthor(RigDef::Author &def)
Definition: ActorSpawner.cpp:5451
CacheSystem.h
A database of user-installed content alias 'mods' (vehicles, terrains...)
RigDef::Keyword::HYDROS
@ HYDROS
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::ProcessSpeedLimiter
void ProcessSpeedLimiter(RigDef::SpeedLimiter &def)
Definition: ActorSpawner.cpp:2826
RigDef::Keyword::SOUNDSOURCES2
@ SOUNDSOURCES2
RoR::ActorSpawnRequest::asr_cache_entry
CacheEntryPtr asr_cache_entry
Optional, overrides 'asr_filename' and 'asr_cache_entry_num'.
Definition: SimData.h:848
RigDef::Keyword::FLEXBODIES
@ FLEXBODIES
RoR::ActorSpawner::ProcessFlare3
void ProcessFlare3(RigDef::Flare3 &def)
Definition: ActorSpawner.cpp:2115
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::CreateCabVisual
void CreateCabVisual()
Definition: ActorSpawner.cpp:7263
RoR::ActorSpawner::FinalizeRig
void FinalizeRig()
Definition: ActorSpawner.cpp:410
RigDef::Keyword::SHOCKS3
@ SHOCKS3
RoR::ActorSpawner::ProcessFixedNode
void ProcessFixedNode(RigDef::Node::Ref node_ref)
Definition: ActorSpawner.cpp:1272
GfxScene.h
RoR::ActorSpawner::ProcessScrewprop
void ProcessScrewprop(RigDef::Screwprop &def)
Definition: ActorSpawner.cpp:717
RoR::ActorSpawner::m_actor
ActorPtr m_actor
Definition: ActorSpawner.h:455
RigDef::Keyword::FLARES3
@ FLARES3
RigDef::Keyword::CRUISECONTROL
@ CRUISECONTROL
RoR::Actor::ar_import_commands
bool ar_import_commands
Sim state.
Definition: Actor.h:481
RoR::ActorSpawner::Message::TYPE_WARNING
@ TYPE_WARNING
RoR::Actor::ar_exhaust_dir_node
NodeNum_t ar_exhaust_dir_node
Old-format exhaust (one per vehicle) backwards direction node.
Definition: Actor.h:375
RoR::ActorSpawner::FinalizeGfxSetup
void FinalizeGfxSetup()
Definition: ActorSpawner.cpp:6776
RoR::ActorSpawner::ProcessBeam
void ProcessBeam(RigDef::Beam &def)
Definition: ActorSpawner.cpp:5506
RoR::ActorSpawner::m_fuse_z_max
float m_fuse_z_max
Definition: ActorSpawner.h:475
RigDef::Keyword::INVALID
@ INVALID
RoR::ActorSpawner::ProcessCollisionRange
void ProcessCollisionRange(RigDef::CollisionRange &def)
Definition: ActorSpawner.cpp:2629
RoR::Actor::ar_rescuer_flag
bool ar_rescuer_flag
Gameplay attr; defined in truckfile. TODO: Does anybody use this anymore?
Definition: Actor.h:479
RoR::ActorSpawner::ProcessNode
void ProcessNode(RigDef::Node &def)
Definition: ActorSpawner.cpp:5893
RoR::ActorSpawner::m_wing_area
float m_wing_area
Definition: ActorSpawner.h:471
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
RigDef::Keyword::PISTONPROPS
@ PISTONPROPS
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::ProcessDescription
void ProcessDescription(Ogre::String const &line)
Definition: ActorSpawner.cpp:849
RoR::ActorSpawner::ProcessInterAxle
void ProcessInterAxle(RigDef::InterAxle &def)
Definition: ActorSpawner.cpp:2719
PROCESS_ELEMENT
#define PROCESS_ELEMENT(_KEYWORD_, _FIELD_, _FUNCTION_)
Definition: ActorSpawnerFlow.cpp:38
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::Keyword::SLIDENODES
@ SLIDENODES
RoR::ActorSpawner::ProcessTie
void ProcessTie(RigDef::Tie &def)
Definition: ActorSpawner.cpp:2906
RigDef::Keyword::BRAKES
@ BRAKES
RigDef::Keyword::TORQUECURVE
@ TORQUECURVE
RigDef::Keyword::LOCKGROUPS
@ LOCKGROUPS
RigDef::Keyword::EXHAUSTS
@ EXHAUSTS
RoR::ActorSpawner::ProcessSoundSource2
void ProcessSoundSource2(RigDef::SoundSource2 &def)
Definition: ActorSpawner.cpp:1162
RigDef::Keyword::PARTICLES
@ PARTICLES
RoR::ActorSpawner::ProcessAntiLockBrakes
void ProcessAntiLockBrakes(RigDef::AntiLockBrakes &def)
Definition: ActorSpawner.cpp:5333
RoR::ActorSpawner::ProcessWheel
void ProcessWheel(RigDef::Wheel &def)
Definition: ActorSpawner.cpp:5281
RoR::ActorSpawner::ProcessCameraRail
void ProcessCameraRail(RigDef::CameraRail &def)
Definition: ActorSpawner.cpp:1216
RigDef::Keyword::HOOKS
@ HOOKS
RoR::ActorSpawner::ProcessExhaust
void ProcessExhaust(RigDef::Exhaust &def)
Definition: ActorSpawner.cpp:1278
RigDef::Keyword::WHEELS2
@ WHEELS2
RigDef::Keyword::FLEXBODYWHEELS
@ FLEXBODYWHEELS
RoR::ActorSpawner::ProcessProp
void ProcessProp(RigDef::Prop &def)
Resource group override is used with addonparts.
Definition: ActorSpawner.cpp:1586
RigDef::Keyword::FIXES
@ FIXES
RoR::Actor::ar_exhaust_pos_node
NodeNum_t ar_exhaust_pos_node
Old-format exhaust (one per vehicle) emitter node.
Definition: Actor.h:374
RigDef::Keyword::ROPABLES
@ ROPABLES
RoR::ActorSpawner::ProcessPistonprop
void ProcessPistonprop(RigDef::Pistonprop &def)
Definition: ActorSpawner.cpp:854
nodes
or anywhere else will not be considered a but parsed as regular data ! Each line is treated as values separated by separators Possible i e animators Multiline description Single does not affect it Directive usualy set global attributes or change behavior of the parsing Directive may appear in any block section Modularity The elements can be grouped into modules Each module must belong to one or more configurations Directives sectionconfig specify truck configurations the user can choose from Exactly one must be selected If the first defined is used lettercase matches original docs(parsing is insensitive). NAME TYPE NOTES advdrag BLOCK add_animation DIRECTIVE Special syntax airbrakes BLOCK animators BLOCK Special syntax IF(values[0]=="") bad trailing chars are silently ignored no space at the end Items delimited On each side of there is max item Empty invalid string parses as node num items Acceptable item the node is the others When a node range has more than nodes
Definition: ReadMe.txt:302
RoR::ActorSpawner::m_fuse_y_min
float m_fuse_y_min
Definition: ActorSpawner.h:476
RoR::ActorSpawner::ProcessTurbojet
void ProcessTurbojet(RigDef::Turbojet &def)
Definition: ActorSpawner.cpp:660
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
RoR::ActorSpawner::InitializeRig
void InitializeRig()
Definition: ActorSpawner.cpp:252
RoR::ActorSpawner::m_first_wing_index
int m_first_wing_index
Definition: ActorSpawner.h:478
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
RigDef::Keyword::RAILGROUPS
@ RAILGROUPS
RoR::GfxActor
Definition: GfxActor.h:52
RoR::ActorSpawner::ProcessRotator2
void ProcessRotator2(RigDef::Rotator2 &def)
Definition: ActorSpawner.cpp:3489
RoR::Actor::ar_design_name
Ogre::String ar_design_name
Name of the vehicle/machine/object this actor represents.
Definition: Actor.h:346
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: RigDef_Prerequisites.h:38
RoR::ActorSpawner::ProcessCommand
void ProcessCommand(RigDef::Command2 &def)
Definition: ActorSpawner.cpp:3613
RigDef::Keyword::DESCRIPTION
@ DESCRIPTION
RigDef::Keyword::INTERAXLES
@ INTERAXLES
RoR::ActorSpawnRequest::asr_position
Ogre::Vector3 asr_position
Definition: SimData.h:851
RigDef::Keyword::AXLES
@ AXLES
RoR::Actor::ar_filehash
std::string ar_filehash
Attribute; filled at spawn.
Definition: Actor.h:426
RigDef::Keyword::MESHWHEELS2
@ MESHWHEELS2
RoR::ActorSpawner::ProcessWheelDetacher
void ProcessWheelDetacher(RigDef::WheelDetacher &def)
Definition: ActorSpawner.cpp:5286
RigDef::Keyword::CAMERAS
@ CAMERAS
RoR::ActorSpawner::ProcessFlexBodyWheel
void ProcessFlexBodyWheel(RigDef::FlexBodyWheel &def)
Definition: ActorSpawner.cpp:4199
RoR::ActorSpawner::ProcessTractionControl
void ProcessTractionControl(RigDef::TractionControl &def)
Definition: ActorSpawner.cpp:5300
RigDef::Keyword::ROTATORS2
@ ROTATORS2
RigDef::Keyword::CINECAM
@ CINECAM
RigDef::Keyword::TURBOJETS
@ TURBOJETS
RoR::ActorSpawner::ProcessTrigger
void ProcessTrigger(RigDef::Trigger &def)
Definition: ActorSpawner.cpp:3268
RoR
Definition: AppContext.h:36
RoR::Actor::m_gfx_actor
std::unique_ptr< GfxActor > m_gfx_actor
Definition: Actor.h:537
RoR::ActorSpawner::ProcessTransferCase
void ProcessTransferCase(RigDef::TransferCase &def)
Definition: ActorSpawner.cpp:2776
RigDef::Keyword::ENGTURBO
@ ENGTURBO
RoR::App::GetGfxScene
GfxScene * GetGfxScene()
Definition: Application.cpp:276
RoR::ActorSpawner::ProcessCinecam
void ProcessCinecam(RigDef::Cinecam &def)
Definition: ActorSpawner.cpp:6052
RoR::ActorSpawner::ProcessManagedMaterial
void ProcessManagedMaterial(RigDef::ManagedMaterial &def)
Definition: ActorSpawner.cpp:2375
RigDef::Keyword::PROPS
@ PROPS
RigDef::Keyword::SCREWPROPS
@ SCREWPROPS
RoR::ActorSpawner::ProcessWheel2
void ProcessWheel2(RigDef::Wheel2 &def)
Definition: ActorSpawner.cpp:5276
RigDef::Keyword::SPEEDLIMITER
@ SPEEDLIMITER
RigDef::Keyword::NODES
@ NODES
RigDef::Keyword::GLOBALS
@ GLOBALS