 |
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
76 #include <OgreMaterialManager.h>
77 #include <OgreSceneManager.h>
78 #include <OgreMovableObject.h>
79 #include <OgreParticleSystem.h>
80 #include <OgreEntity.h>
82 #include <fmt/format.h>
93 if (sectionconfig !=
"")
95 auto result = def->user_modules.find(sectionconfig);
97 if (result != def->user_modules.end())
100 LOG(
" == ActorSpawner: Module added to configuration: " + sectionconfig);
128 LOG(
" == ActorSpawner: Addon part added to configuration: " + addonpart);
158 for (
auto& def: module_def->
nodes)
264 for (
size_t i = 0; i < req.
num_nodes; ++i)
327 #ifdef USE_ANGELSCRIPT
329 #endif // USE_ANGELSCRIPT
399 "Failed to load built-in material 'tracks/simple'; disabling 'SimpleMaterials'");
469 float proped_wheels_radius_sum = 0.0f;
509 if ((a1 == i - 1) && (a2 == i - 0))
542 float max_dist = 0.0f;
556 float offset = atan2(dir.dotProduct(Ogre::Vector3::UNIT_Z), dir.dotProduct(Ogre::Vector3::UNIT_X));
576 Ogre::Vector3 cross = dir_node_offset.crossProduct(roll_node_offset);
630 if (wcent.x>prop.x && wcent.x<prop.x+15.0)
633 if (wcent.y>prop.y-radius && wcent.y<prop.y+radius)
638 float pleft=prop.z+radius;
639 float pright=prop.z-radius;
641 if (pleft<aleft) aleft=pleft;
643 if (pright>aright) aright=pright;
647 float wratio=(aleft-aright)/(wleft-wright);
671 Ogre::Entity* afterburn_ent =
nullptr;
681 propname, nozzle_ent, afterburn_ent);
780 Ogre::String
const & airfoil,
789 this->
ComposeName(
"turboprop", aeroengine_index).c_str(),
878 this->
ComposeName(
"airbrake", airbrake_idx).c_str(),
909 ab->
offset = Ogre::Vector3::ZERO;
942 this->GetNodeIndexOrThrow(def.
nodes[2]),
943 this->GetNodeIndexOrThrow(def.
nodes[3]),
944 this->GetNodeIndexOrThrow(def.
nodes[4]),
945 this->GetNodeIndexOrThrow(def.
nodes[5]),
946 this->GetNodeIndexOrThrow(def.
nodes[6]),
947 this->GetNodeIndexOrThrow(def.
nodes[7]),
962 Ogre::Entity* entity =
nullptr;
990 if (node1 != previous_wing.
fa->
nfld)
1025 left_green_prop.
pp_beacon_bbs[0]->setMaterialName(
"tracks/greenflare");
1029 left_green_prop.
pp_beacon_bbs[0]->setDefaultDimensions(0.5, 0.5);
1047 left_flash_prop.
pp_beacon_light[0]->setDiffuseColour( Ogre::ColourValue(1.0, 1.0, 1.0));
1048 left_flash_prop.
pp_beacon_light[0]->setSpecularColour( Ogre::ColourValue(1.0, 1.0, 1.0));
1049 left_flash_prop.
pp_beacon_light[0]->setAttenuation(50.0, 1.0, 0.3, 0.0);
1059 left_flash_prop.
pp_beacon_bbs[0]->setMaterialName(
"tracks/flare");
1063 left_flash_prop.
pp_beacon_bbs[0]->setDefaultDimensions(1.0, 1.0);
1088 right_red_prop.
pp_beacon_bbs[0]->setMaterialName(
"tracks/redflare");
1092 right_red_prop.
pp_beacon_bbs[0]->setDefaultDimensions(0.5, 0.5);
1110 right_flash_prop.
pp_beacon_light[0]->setDiffuseColour( Ogre::ColourValue(1.0, 1.0, 1.0));
1111 right_flash_prop.
pp_beacon_light[0]->setSpecularColour( Ogre::ColourValue(1.0, 1.0, 1.0));
1112 right_flash_prop.
pp_beacon_light[0]->setAttenuation(50.0, 1.0, 0.3, 0.0);
1122 right_flash_prop.
pp_beacon_bbs[0]->setMaterialName(
"tracks/flare");
1126 right_flash_prop.
pp_beacon_bbs[0]->setDefaultDimensions(1.0, 1.0);
1157 return (((
x-ref).crossProduct(
y-ref)).length()+((
x-aref).crossProduct(
y-aref)).length())*0.5f;
1174 #endif // USE_OPENAL
1181 #endif // USE_OPENAL
1191 if (sound_script ==
nullptr)
1211 #endif // USE_OPENAL
1216 auto itor = def.
nodes.begin();
1217 auto end = def.
nodes.end();
1218 for(; itor != end; ++itor)
1240 if (def.
key ==
"helpMaterial")
1244 else if (def.
key ==
"speedoMax")
1247 if (maxKph > 10 && maxKph < 32000)
1258 else if (def.
key ==
"useMaxRPM")
1262 else if (def.
key ==
"shifterAnimTime")
1289 if (template_name ==
"" || template_name ==
"default")
1291 template_name =
"tracks/Smoke";
1299 if (exhaust.
smoker ==
nullptr)
1301 std::stringstream msg;
1302 msg <<
"Failed to create particle system '" << name <<
"' (template: '" << template_name <<
"')";
1322 for (; module_itor != module_end; ++module_itor)
1324 if (! module_itor->get()->submesh_groundmodel.empty())
1326 return module_itor->get()->submesh_groundmodel[0];
1329 return std::string();
1341 std::vector<RigDef::Texcoord>::iterator texcoord_itor = def.
texcoords.begin();
1342 for ( ; texcoord_itor != def.
texcoords.end(); texcoord_itor++)
1360 for ( ; cab_itor != cab_itor_end; ++cab_itor)
1368 std::stringstream msg;
1369 msg <<
"Collcab limit (" <<
MAX_CABS <<
") exceeded";
1374 bool mk_buoyance =
false;
1417 std::stringstream msg;
1418 msg <<
"Collcab limit (" <<
MAX_CABS <<
") exceeded";
1424 std::stringstream msg;
1425 msg <<
"Buoycab limit (" <<
MAX_CABS <<
") exceeded";
1527 std::vector<unsigned int> node_indices;
1528 bool nodes_found =
true;
1534 nodes_found =
false;
1537 node_indices.push_back(node);
1569 catch (Ogre::Exception&)
1592 pprop.
pp_id = prop_id;
1601 prop.
pp_id = prop_id;
1608 prop.
pp_rot = Ogre::Quaternion(Ogre::Degree(prop.
pp_rota.z), Ogre::Vector3::UNIT_Z)
1609 * Ogre::Quaternion(Ogre::Degree(prop.
pp_rota.y), Ogre::Vector3::UNIT_Y)
1610 * Ogre::Quaternion(Ogre::Degree(prop.
pp_rota.x), Ogre::Vector3::UNIT_X);
1630 Ogre::Vector3 steering_wheel_offset = Ogre::Vector3::ZERO;
1633 steering_wheel_offset = Ogre::Vector3(-0.67, -0.61,0.24);
1637 steering_wheel_offset = Ogre::Vector3(0.67, -0.61,0.24);
1639 if (steering_wheel_offset != Ogre::Vector3::ZERO)
1652 this->ComposeName(
"steering wheel entity @ prop", prop_id),
1664 this->ComposeName(
"prop entity", prop_id),
1713 pp_beacon_light->setType(Ogre::Light::LT_SPOTLIGHT);
1716 pp_beacon_light->setAttenuation(50.0, 1.0, 0.3, 0.0);
1717 pp_beacon_light->setSpotlightRange( Ogre::Degree(35), Ogre::Degree(45) );
1718 pp_beacon_light->setCastShadows(
false);
1719 pp_beacon_light->setVisible(
false);
1724 if (flare_billboard_sys)
1726 flare_billboard_sys->createBillboard(0,0,0);
1727 flare_billboard_sys->setMaterialName(prop.
pp_media[1]);
1729 flare_scene_node->attachObject(flare_billboard_sys);
1731 flare_scene_node->setVisible(
false);
1745 pp_beacon_light->setType(Ogre::Light::LT_POINT);
1746 pp_beacon_light->setDiffuseColour( Ogre::ColourValue(1.0, 0.0, 0.0));
1747 pp_beacon_light->setSpecularColour( Ogre::ColourValue(1.0, 0.0, 0.0));
1748 pp_beacon_light->setAttenuation(50.0, 1.0, 0.3, 0.0);
1749 pp_beacon_light->setCastShadows(
false);
1750 pp_beacon_light->setVisible(
false);
1754 if (flare_billboard_sys)
1756 flare_billboard_sys->createBillboard(0,0,0);
1757 flare_billboard_sys->setMaterialName(
"tracks/redbeaconflare");
1759 flare_billboard_sys->setDefaultDimensions(1.0, 1.0);
1760 flare_scene_node->attachObject(flare_billboard_sys);
1762 flare_scene_node->setVisible(
false);
1774 for (
int k=0; k<4; k++)
1784 prop.
pp_beacon_light[k]->setDiffuseColour( Ogre::ColourValue(1.0, 0.0, 0.0));
1785 prop.
pp_beacon_light[k]->setSpecularColour( Ogre::ColourValue(1.0, 0.0, 0.0));
1789 prop.
pp_beacon_light[k]->setDiffuseColour( Ogre::ColourValue(0.0, 0.5, 1.0));
1790 prop.
pp_beacon_light[k]->setSpecularColour( Ogre::ColourValue(0.0, 0.5, 1.0));
1793 prop.
pp_beacon_light[k]->setSpotlightRange( Ogre::Degree(35), Ogre::Degree(45) );
1804 prop.
pp_beacon_bbs[k]->setMaterialName(
"tracks/brightredflare");
1808 prop.
pp_beacon_bbs[k]->setMaterialName(
"tracks/brightblueflare");
1837 if (anim_def.
ratio == 0)
1839 std::stringstream msg;
1840 msg <<
"Prop (mesh: " << def.
mesh_name <<
") has invalid animation ratio (0), using it anyway (compatibility)...";
1968 std::list<RigDef::Animation::MotorSource>::iterator source_itor = anim_def.
motor_sources.begin();
1969 for ( ; source_itor != anim_def.
motor_sources.end(); source_itor++)
1974 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
1978 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
1982 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
1986 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
1990 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
1996 anim.
animOpt3 =
static_cast<float>(source_itor->motor);
2031 anim.
animOpt3 =
static_cast<float>(link_id);
2069 const bool use_default_lower_limit = (anim_def.
lower_limit == 0.f);
2070 const bool use_default_upper_limit = (anim_def.
upper_limit == 0.f);
2132 float size = def.
size;
2137 if (blink_delay == -2)
2161 flare.
blinkdelay = (blink_delay == -1) ? 0.5f : blink_delay / 1000.f;
2183 fmt::format(
"Bad flare control num {}, must be 1-{}, using 1.",
2190 fmt::format(
"Bad flare control num {}, must be 1-{}, using {}.",
2212 std::string flare_name = this->
ComposeName(
"Flare", flare_id);
2213 if (!is_placeholder)
2227 if (flare.
bbs ==
nullptr)
2233 flare.
bbs->createBillboard(0,0,0);
2236 if (using_default_material)
2240 material_name =
"tracks/brakeflare";
2244 material_name =
"tracks/blinkflare";
2248 material_name =
"tracks/greenflare";
2252 material_name =
"tracks/redflare";
2256 material_name =
"tracks/flare";
2263 flare.
bbs->setMaterial(material);
2264 flare.
snode->attachObject(flare.
bbs);
2268 flare.
light =
nullptr;
2275 flare.
light->setType(Ogre::Light::LT_SPOTLIGHT);
2276 flare.
light->setDiffuseColour( Ogre::ColourValue(1, 1, 1));
2277 flare.
light->setSpecularColour( Ogre::ColourValue(1, 1, 1));
2278 flare.
light->setAttenuation(200, 0.9, 0, 0);
2279 flare.
light->setSpotlightRange( Ogre::Degree(35), Ogre::Degree(45) );
2280 flare.
light->setCastShadows(
false);
2285 flare.
light->setType(Ogre::Light::LT_SPOTLIGHT);
2286 flare.
light->setDiffuseColour(Ogre::ColourValue(1, 1, 1));
2287 flare.
light->setSpecularColour(Ogre::ColourValue(1, 1, 1));
2288 flare.
light->setAttenuation(400, 0.9, 0, 0);
2289 flare.
light->setSpotlightRange(Ogre::Degree(35), Ogre::Degree(45));
2290 flare.
light->setCastShadows(
false);
2295 flare.
light->setType(Ogre::Light::LT_SPOTLIGHT);
2296 flare.
light->setDiffuseColour(Ogre::ColourValue(1, 1, 1));
2297 flare.
light->setSpecularColour(Ogre::ColourValue(1, 1, 1));
2298 flare.
light->setAttenuation(400, 0.9, 0, 0);
2299 flare.
light->setSpotlightRange(Ogre::Degree(35), Ogre::Degree(45));
2300 flare.
light->setCastShadows(
false);
2308 flare.
light->setDiffuseColour( Ogre::ColourValue(1.0, 0, 0));
2309 flare.
light->setSpecularColour( Ogre::ColourValue(1.0, 0, 0));
2310 flare.
light->setAttenuation(10.0, 1.0, 0, 0);
2315 flare.
light->setDiffuseColour(Ogre::ColourValue(1, 1, 1));
2316 flare.
light->setSpecularColour(Ogre::ColourValue(1, 1, 1));
2317 flare.
light->setAttenuation(20.0, 1, 0, 0);
2322 flare.
light->setDiffuseColour( Ogre::ColourValue(1.0, 0, 0));
2323 flare.
light->setSpecularColour( Ogre::ColourValue(1.0, 0, 0));
2324 flare.
light->setAttenuation(10.0, 1.0, 0, 0);
2329 flare.
light->setDiffuseColour( Ogre::ColourValue(1, 1, 0));
2330 flare.
light->setSpecularColour( Ogre::ColourValue(1, 1, 0));
2331 flare.
light->setAttenuation(10.0, 1, 1, 0);
2336 flare.
light->setDiffuseColour( Ogre::ColourValue(1, 1, 1));
2337 flare.
light->setSpecularColour( Ogre::ColourValue(1, 1, 1));
2338 flare.
light->setAttenuation(1.0, 1.0, 1, 0.2);
2343 flare.
light->setDiffuseColour(Ogre::ColourValue(1, 1, 1));
2344 flare.
light->setSpecularColour(Ogre::ColourValue(1, 1, 1));
2345 flare.
light->setAttenuation(5.0, 1.0, 1, 0.2);
2350 if (flare.
light !=
nullptr)
2352 flare.
light->setType(Ogre::Light::LT_SPOTLIGHT);
2353 flare.
light->setSpotlightRange( Ogre::Degree(35), Ogre::Degree(45) );
2354 flare.
light->setCastShadows(
false);
2357 snode->attachObject(flare.
light);
2399 Ogre::MaterialPtr src_mat = Ogre::MaterialManager::getSingleton().getByName(source_name, rg_name);
2402 std::stringstream msg;
2403 msg <<
"Built-in material '" << source_name <<
"' missing! Skipping...";
2405 return Ogre::MaterialPtr();
2408 return src_mat->clone(clone_name);
2427 if (!Ogre::ResourceGroupManager::getSingleton().resourceExists(resource_group, def.
diffuse_map))
2434 !Ogre::ResourceGroupManager::getSingleton().resourceExists(resource_group, def.
damaged_diffuse_map))
2441 !Ogre::ResourceGroupManager::getSingleton().resourceExists(resource_group, def.
specular_map))
2454 if (!Ogre::MaterialManager::getSingleton().getByName(def.
name, module_rg))
2456 LOG(
fmt::format(
"[RoR] DBG ActorSpawner::ProcessManagedMaterial(): Creating placeholder for material '{}' in group '{}'", def.
name, module_rg));
2461 LOG(
fmt::format(
"[RoR] DBG ActorSpawner::ProcessManagedMaterial(): Placeholder already exists: '{}' in group '{}'", def.
name, module_rg));
2466 Ogre::MaterialPtr material;
2470 material = Ogre::MaterialManager::getSingleton().getByName(
"tracks/transred")->clone(custom_name,
true, resource_group);
2474 std::string mat_name_base
2476 ?
"managed/flexmesh_standard"
2477 :
"managed/flexmesh_transparent";
2569 Ogre::String mat_name_base
2571 ?
"managed/mesh_standard"
2572 :
"managed/mesh_transparent";
2621 material->getTechnique(
"BaseTechnique")->getPass(
"BaseRender")->setCullingMode(Ogre::CULL_NONE);
2626 material->getTechnique(
"BaseTechnique")->getPass(
"SpecularMapping1")->setCullingMode(Ogre::CULL_NONE);
2630 material->getTechnique(
"BaseTechnique")->getPass(
"Specular")->setCullingMode(Ogre::CULL_NONE);
2636 material->compile();
2653 RoR::LogFormat(
"[RoR|Spawner] Collision box: re-assigning node '%s' from box ID '%d' to '%d'",
2682 _out_axle_wheel = i;
2705 std::stringstream msg;
2706 msg <<
"Couldn't find wheel with axis nodes '" << def.
wheels[0][0].
ToString()
2713 std::stringstream msg;
2714 msg <<
"Couldn't find wheel with axis nodes '" << def.
wheels[1][0].
ToString()
2728 for (
auto itor = def.
options.begin(); itor != end; ++itor)
2768 AddMessage(
Message::TYPE_ERROR,
"You cannot have both an inter-axle differential and a transfercase between the same two axles, skipping...");
2855 std::stringstream msg;
2857 <<
") must be positive nonzero number. Using it anyway (compatibility)";
2885 std::vector<RigDef::TorqueCurve::Sample>::iterator itor = def.
samples.begin();
2886 for ( ; itor != def.
samples.end(); itor++)
2888 target_torque_curve->
AddCurveSample(itor->power, itor->torque_percent);
2908 if (particle.
psys ==
nullptr)
2910 std::stringstream msg;
2911 msg <<
"Failed to create particle system '" << name <<
"' (template: '" << def.
particle_system_name <<
"')";
2917 particle.
snode->attachObject(particle.
psys);
3055 if (rail_group ==
nullptr)
3057 std::stringstream msg;
3058 msg <<
"Specified rail group id '" << def.
railgroup_id <<
"' not found. Ignoring slidenode...";
3066 if (rail_group !=
nullptr)
3085 std::stringstream msg;
3086 msg <<
"Failed to find node by reference: " << node_ref.
ToString();
3093 std::vector<RigDef::Node::Range> & node_ranges,
3094 std::vector<NodeNum_t> & out_node_indices
3097 std::vector<RigDef::Node::Range>::iterator itor = node_ranges.begin();
3098 for ( ; itor != node_ranges.end(); itor++)
3100 if (itor->IsRange())
3114 std::stringstream msg;
3115 msg <<
"Encountered non-existent node '" << itor->end.ToString() <<
"' in range [" << itor->start.ToString() <<
" - " << itor->end.ToString() <<
"], "
3118 if (itor->end.Str().empty())
3120 msg <<
" However, this node must be accepted anyway for backwards compatibility."
3121 <<
" Please fix this as soon as possible.";
3122 end = itor->end.Num();
3139 for (
NodeNum_t i = start; i <= end; i++)
3141 out_node_indices.push_back(i);
3155 std::vector<NodeNum_t> node_indices;
3160 for (
unsigned int i = 0; i < node_indices.size() - 1; i++)
3163 if (beam ==
nullptr)
3165 std::stringstream msg;
3166 msg <<
"No beam between nodes indexed '" << node_indices[i] <<
"' and '" << node_indices[i + 1] <<
"'";
3176 for (
size_t i = 1; i < (num_seg - 1); ++i)
3183 const bool is_loop = (node_indices.front() == node_indices.back());
3220 if (node ==
nullptr)
3230 if (itor->hk_hook_node == node)
3237 if (hook ==
nullptr)
3239 std::stringstream msg;
3240 msg <<
"Node '" << def.
node.
ToString() <<
"' is not a hook-node (not marked with flag 'h'), ignoring...";
3271 int beam_index = -1;
3288 auto itor = lockgroup.
nodes.begin();
3289 auto end = lockgroup.
nodes.end();
3290 for (; itor != end; ++itor)
3303 bool invisible =
false;
3305 bool shock_trigger_enabled =
true;
3306 bool triggerblocker =
false;
3307 bool triggerblocker_inverted =
false;
3308 bool cmdkeyblock =
false;
3309 bool hooktoggle =
false;
3310 bool enginetrigger =
false;
3312 bool trigger_cmdkeyblock_state_short =
false;
3313 bool trigger_cmdkeyblock_state_long =
true;
3323 shock_trigger_enabled =
false;
3328 triggerblocker =
true;
3340 sbound = abs(sbound-1);
3346 triggerblocker_inverted =
true;
3365 enginetrigger =
true;
3368 if (!triggerblocker && !triggerblocker_inverted && !hooktoggle && !enginetrigger)
3377 else if (!hooktoggle && !enginetrigger)
3386 else if (enginetrigger)
3422 LOG(
"Trigger added. BeamID " +
TOSTRING(beam_index));
3426 beam.
shock = &shock;
3427 shock.
beamid = beam_index;
3429 if (!triggerblocker && !triggerblocker_inverted)
3439 if (!triggerblocker_inverted)
3455 if (cmdkeyblock && !triggerblocker)
3457 trigger_cmdkeyblock_state_short =
true;
3465 shock.
flags = shockflag;
3494 for (
unsigned int i = 0; i < 4; i++)
3530 for (
unsigned int i = 0; i < 4; i++)
3566 std::string start_function;
3567 std::string stop_function;
3594 Ogre::String start_function;
3595 Ogre::String stop_function;
3663 float center_length = 0.f;
3689 contract_command->
beams.push_back(cmd_beam);
3699 extend_command->
beams.push_back(cmd_beam);
3718 bool must_insert_qpair =
true;
3725 must_insert_qpair =
false;
3733 if (must_insert_qpair)
3746 float anim_option = 0;
3904 std::shared_ptr<RigDef::BeamDefaults> & beam_defaults,
3914 float strength = beam_defaults->breaking_threshold;
3920 float plastic_coef = beam_defaults->plastic_deform_coef;
3933 bool invisible =
false;
3934 unsigned int hydro_flags = 0;
4024 short_bound /= beam_length;
4025 long_bound /= beam_length;
4030 short_bound = (beam_length - short_bound) / beam_length;
4031 long_bound = (long_bound - beam_length) / beam_length;
4033 if (long_bound < 0.f)
4037 "Metric shock length calculation failed, 'short_bound' less than beams spawn length. Resetting to beam's spawn length (short_bound = 0)"
4042 if (short_bound > 1.f)
4046 "Metric shock length calculation failed, 'short_bound' less than 0 meters. Resetting to 0 meters (short_bound = 1)"
4073 shock.
flags = shock_flags;
4087 beam.
shock = & shock;
4088 shock.
beamid = beam_index;
4107 short_bound /= beam_length;
4108 long_bound /= beam_length;
4113 short_bound = (beam_length - short_bound) / beam_length;
4114 long_bound = (long_bound - beam_length) / beam_length;
4116 if (long_bound < 0.f)
4120 "Metric shock length calculation failed, 'short_bound' less than beams spawn length. Resetting to beam's spawn length (short_bound = 0)"
4125 if (short_bound > 1.f)
4129 "Metric shock length calculation failed, 'short_bound' less than 0 meters. Resetting to 0 meters (short_bound = 1)"
4156 shock.
flags = shock_flags;
4168 beam.
shock = & shock;
4169 shock.
beamid = beam_index;
4195 short_bound /= beam_length;
4196 long_bound /= beam_length;
4215 shock.
flags = shock_flags;
4224 beam.
shock = & shock;
4225 shock.
beamid = beam_index;
4239 node_t* swap = axis_node_1;
4240 axis_node_1 = axis_node_2;
4245 node_t *rigidity_node =
nullptr;
4246 node_t *axis_node_closest_to_rigidity_node =
nullptr;
4252 axis_node_closest_to_rigidity_node = ((distance_1 < distance_2)) ? axis_node_1 : axis_node_2;
4261 wheel.
wh_width = axis_vector.length();
4262 axis_vector.normalise();
4263 Ogre::Vector3 rim_ray_vector = axis_vector.perpendicular() * override_rim_radius;
4264 Ogre::Quaternion rim_ray_rotator = Ogre::Quaternion(Ogre::Degree(-360.f / (def.
num_rays * 2)), axis_vector);
4267 for (
unsigned int i = 0; i < def.
num_rays; i++)
4272 Ogre::Vector3 ray_point = axis_node_1->
RelPosition + rim_ray_vector;
4273 rim_ray_vector = rim_ray_rotator * rim_ray_vector;
4278 outer_node.
mass = node_mass;
4287 ray_point = axis_node_2->
RelPosition + rim_ray_vector;
4288 rim_ray_vector = rim_ray_rotator * rim_ray_vector;
4293 inner_node.
mass = node_mass;
4306 Ogre::Vector3 tyre_ray_vector = axis_vector.perpendicular() * override_tire_radius;
4307 Ogre::Quaternion& tyre_ray_rotator = rim_ray_rotator;
4308 tyre_ray_vector = tyre_ray_rotator * tyre_ray_vector;
4311 for (
unsigned int i = 0; i < def.
num_rays; i++)
4315 Ogre::Vector3 ray_point = axis_node_1->
RelPosition + tyre_ray_vector;
4316 tyre_ray_vector = tyre_ray_rotator * tyre_ray_vector;
4320 outer_node.
mass = node_mass;
4331 ray_point = axis_node_2->
RelPosition + tyre_ray_vector;
4332 tyre_ray_vector = tyre_ray_rotator * tyre_ray_vector;
4336 inner_node.
mass = node_mass;
4347 wheel.
wh_nodes[i * 2] = & outer_node;
4348 wheel.
wh_nodes[(i * 2) + 1] = & inner_node;
4359 for (
unsigned int i = 0; i < def.
num_rays; i++)
4364 unsigned int rim_outer_node_index = base_node_index + (i * 2);
4374 unsigned int rim_next_outer_node_index = base_node_index + (((i + 1) % def.
num_rays) * 2);
4386 for (
unsigned int i = 0; i < def.
num_rays; i++)
4388 int rim_node_index = base_node_index + i*2;
4389 int tyre_node_index = base_node_index + i*2 + def.
num_rays*2;
4394 int tyre_base_index = (i == 0) ? tyre_node_index + (def.
num_rays * 2) : tyre_node_index;
4403 int index = (i == 0) ? tyre_node_index + (def.
num_rays * 2) - 1 : tyre_node_index - 1;
4412 int rimnode = rim_node_index;
4420 if (rigidity_node !=
nullptr)
4422 if (axis_node_closest_to_rigidity_node == axis_node_1)
4424 axis_node_closest_to_rigidity_node = &
m_actor->
ar_nodes[base_node_index+i*2+rays*2];
4427 axis_node_closest_to_rigidity_node = &
m_actor->
ar_nodes[base_node_index+i*2+1+rays*2];
4429 unsigned int beam_index =
AddWheelBeam(rigidity_node, axis_node_closest_to_rigidity_node, tyre_spring, tyre_damp, def.
beam_defaults);
4438 float support_beams_short_bound = 1.0f - ((override_rim_radius / override_tire_radius) * 0.95f);
4440 for (
unsigned int i=0; i<def.
num_rays; i++)
4443 unsigned int tirenode = base_node_index + i*2 + def.
num_rays*2;
4444 unsigned int beam_index;
4485 override_rim_radius,
4518 out_node_1 = def_node_2;
4519 out_node_2 = def_node_1;
4523 out_node_1 = def_node_1;
4524 out_node_2 = def_node_2;
4532 node_t* axis_node_1 =
nullptr;
4533 node_t* axis_node_2 =
nullptr;
4537 this->BuildWheelObjectAndNodes(
4588 node_t* axis_node_1 =
nullptr;
4589 node_t* axis_node_2 =
nullptr;
4594 this->BuildWheelObjectAndNodes(
4611 float tyre_spring = def.
spring;
4612 float tyre_damp = def.
damping;
4654 unsigned int num_rays,
4656 Ogre::String mesh_name,
4657 Ogre::String mesh_rg,
4658 Ogre::String material_name,
4659 Ogre::String material_rg,
4690 catch (Ogre::Exception& e)
4699 unsigned int num_rays,
4702 node_t *reference_arm_node,
4703 unsigned int reserve_nodes,
4704 unsigned int reserve_beams,
4708 std::shared_ptr<RigDef::NodeDefaults> node_defaults,
4717 float axis_length = axis_vector.length();
4718 axis_vector.normalise();
4727 wheel.
wh_width = (wheel_width < 0) ? axis_length : wheel_width;
4743 Ogre::Vector3 ray_vector = axis_vector.perpendicular() * wheel_radius;
4744 Ogre::Quaternion ray_rotator = Ogre::Quaternion(Ogre::Degree(-360.0 / (num_rays * 2)), axis_vector);
4746 for (
unsigned int i = 0; i < num_rays; i++)
4749 Ogre::Vector3 ray_point = axis_node_1->
RelPosition + ray_vector;
4751 ray_vector = ray_rotator * ray_vector;
4754 InitNode(outer_node, ray_point, node_defaults);
4755 outer_node.
mass = wheel_mass / (2.f * num_rays);
4764 ray_point = axis_node_2->
RelPosition + ray_vector;
4766 ray_vector = ray_rotator * ray_vector;
4769 InitNode(inner_node, ray_point, node_defaults);
4770 inner_node.
mass = wheel_mass / (2.f * num_rays);
4779 wheel.
wh_nodes[i * 2] = & outer_node;
4780 wheel.
wh_nodes[(i * 2) + 1] = & inner_node;
4786 unsigned int options = (defaults->options | node_def.
options);
4796 unsigned int num_rays,
4804 std::shared_ptr<RigDef::BeamDefaults> beam_defaults,
4810 bool rigidity_beam_side_1 =
false;
4811 node_t *rigidity_node =
nullptr;
4817 rigidity_beam_side_1 = distance_1 < distance_2;
4820 for (
unsigned int i = 0; i < num_rays; i++)
4823 unsigned int outer_ring_node_index = base_node_index + (i * 2);
4827 AddWheelBeam(axis_node_1, outer_ring_node, tyre_spring, tyre_damping, beam_defaults, 0.66f, max_extension);
4828 AddWheelBeam(axis_node_2, inner_ring_node, tyre_spring, tyre_damping, beam_defaults, 0.66f, max_extension);
4829 AddWheelBeam(axis_node_2, outer_ring_node, tyre_spring, tyre_damping, beam_defaults);
4830 AddWheelBeam(axis_node_1, inner_ring_node, tyre_spring, tyre_damping, beam_defaults);
4833 unsigned int next_outer_ring_node_index = base_node_index + (((i + 1) % num_rays) * 2);
4837 AddWheelBeam(outer_ring_node, inner_ring_node, rim_spring, rim_damping, beam_defaults);
4838 AddWheelBeam(outer_ring_node, next_outer_ring_node, rim_spring, rim_damping, beam_defaults);
4839 AddWheelBeam(inner_ring_node, next_inner_ring_node, rim_spring, rim_damping, beam_defaults);
4840 AddWheelBeam(inner_ring_node, next_outer_ring_node, rim_spring, rim_damping, beam_defaults);
4843 if (rigidity_node !=
nullptr)
4845 node_t *target_node = (rigidity_beam_side_1) ? outer_ring_node : inner_ring_node;
4846 unsigned int beam_index =
AddWheelBeam(rigidity_node, target_node, tyre_spring, tyre_damping, beam_defaults, -1.f, -1.f,
BEAM_VIRTUAL);
4856 node_t* axis_node_1 =
nullptr;
4857 node_t* axis_node_2 =
nullptr;
4862 this->BuildWheelObjectAndNodes(
4919 node_t* axis_node_1 =
nullptr;
4920 node_t* axis_node_2 =
nullptr;
4926 bool rigidity_beam_side_1 =
false;
4932 rigidity_beam_side_1 = distance_1 < distance_2;
4942 axis_vector.normalise();
4943 Ogre::Vector3 rim_ray_vector = Ogre::Vector3(0, override_rim_radius, 0);
4944 Ogre::Quaternion rim_ray_rotator = Ogre::Quaternion(Ogre::Degree(-360.f / wheel_2_def.
num_rays), axis_vector);
4947 wheel.
wh_width = axis_vector.length();
4950 for (
unsigned int i = 0; i < wheel_2_def.
num_rays; i++)
4952 float node_mass = wheel_2_def.
mass / (4.f * wheel_2_def.
num_rays);
4955 Ogre::Vector3 ray_point = axis_node_1->
RelPosition + rim_ray_vector;
4959 outer_node.
mass = node_mass;
4967 ray_point = axis_node_2->
RelPosition + rim_ray_vector;
4971 inner_node.
mass = node_mass;
4982 rim_ray_vector = rim_ray_rotator * rim_ray_vector;
4985 Ogre::Vector3 tyre_ray_vector = Ogre::Vector3(0, override_tire_radius, 0);
4986 Ogre::Quaternion tyre_ray_rotator = Ogre::Quaternion(Ogre::Degree(-180.f / wheel_2_def.
num_rays), axis_vector);
4987 tyre_ray_vector = tyre_ray_rotator * tyre_ray_vector;
4990 for (
unsigned int i = 0; i < wheel_2_def.
num_rays; i++)
4993 Ogre::Vector3 ray_point = axis_node_1->
RelPosition + tyre_ray_vector;
4997 outer_node.
mass = (0.67f * wheel_2_def.
mass) / (2.f * wheel_2_def.
num_rays);
5007 ray_point = axis_node_2->
RelPosition + tyre_ray_vector;
5011 inner_node.
mass = (0.33f * wheel_2_def.
mass) / (2.f * wheel_2_def.
num_rays);
5021 wheel.
wh_nodes[i * 2] = & outer_node;
5022 wheel.
wh_nodes[(i * 2) + 1] = & inner_node;
5024 tyre_ray_vector = rim_ray_rotator * tyre_ray_vector;
5028 for (
unsigned int i = 0; i < wheel_2_def.
num_rays; i++)
5033 unsigned int rim_outer_node_index = base_node_index + (i * 2);
5037 unsigned int beam_index;
5038 beam_index =
AddWheelRimBeam(wheel_2_def, axis_node_1, rim_outer_node);
5040 beam_index =
AddWheelRimBeam(wheel_2_def, axis_node_2, rim_inner_node);
5046 unsigned int rim_next_outer_node_index = base_node_index + (((i + 1) % wheel_2_def.
num_rays) * 2);
5062 (rigidity_beam_side_1) ? rim_outer_node : rim_inner_node
5069 unsigned int tyre_node_index = rim_outer_node_index + (2 * wheel_2_def.
num_rays);
5072 unsigned int tyre_next_node_index = rim_next_outer_node_index + (2 * wheel_2_def.
num_rays);
5077 AddTyreBeam(wheel_2_def, tyre_outer_node, tyre_next_outer_node);
5078 AddTyreBeam(wheel_2_def, tyre_outer_node, tyre_next_inner_node);
5079 AddTyreBeam(wheel_2_def, tyre_inner_node, tyre_next_outer_node);
5080 AddTyreBeam(wheel_2_def, tyre_inner_node, tyre_next_inner_node);
5082 AddTyreBeam(wheel_2_def, tyre_outer_node, rim_outer_node);
5083 AddTyreBeam(wheel_2_def, tyre_outer_node, rim_next_outer_node);
5084 AddTyreBeam(wheel_2_def, tyre_inner_node, rim_inner_node);
5085 AddTyreBeam(wheel_2_def, tyre_inner_node, rim_next_inner_node);
5087 AddTyreBeam(wheel_2_def, tyre_outer_node, rim_inner_node);
5088 AddTyreBeam(wheel_2_def, tyre_outer_node, rim_next_inner_node);
5089 AddTyreBeam(wheel_2_def, tyre_inner_node, rim_outer_node);
5090 AddTyreBeam(wheel_2_def, tyre_inner_node, rim_next_outer_node);
5092 AddTyreBeam(wheel_2_def, axis_node_1, tyre_outer_node);
5093 AddTyreBeam(wheel_2_def, axis_node_2, tyre_inner_node);
5130 override_rim_radius / override_tire_radius
5140 unsigned int num_rays,
5141 Ogre::String
const& face_material_name,
5142 Ogre::String
const& face_material_rg,
5143 Ogre::String
const& band_material_name,
5144 Ogre::String
const& band_material_rg,
5157 const std::string wheel_mesh_name = this->
ComposeName(
"mesh @ wheel*", wheel_index);
5163 static_cast<NodeNum_t>(node_base_index),
5165 face_material_name, face_material_rg,
5166 band_material_name, band_material_rg,
5171 const std::string instance_name = this->
ComposeName(
"entity @ wheel*", wheel_index);
5179 catch (Ogre::Exception& e)
5193 std::string rim_mesh_name,
5194 std::string rim_mesh_rg,
5195 std::string tire_mesh_name,
5196 std::string tire_mesh_rg)
5214 int num_nodes = num_rays * 4;
5215 std::vector<unsigned int> node_indices;
5216 node_indices.reserve(num_nodes);
5217 for (
int i = 0; i < num_nodes; ++i)
5219 node_indices.push_back( node_base_index + i );
5229 Ogre::Vector3(0.5f, 0.5f, 0.f),
5230 Ogre::Vector3(0.f, 0.f, 0.f),
5236 if (flexbody ==
nullptr)
5243 catch (Ogre::Exception& e)
5246 "Failed to create flexbodywheel visuals '" + tire_mesh_name +
"', reason:" + e.getDescription());
5255 std::shared_ptr<RigDef::BeamDefaults> beam_defaults,
5256 float max_contraction,
5257 float max_extension,
5266 if (max_contraction > 0.f)
5337 if (force < 1.f || force > 20.f)
5339 std::stringstream msg;
5340 msg <<
"Clamping 'regulating_force' value '" << force <<
"' to allowed range <1 - 20>";
5342 force = (force < 1.f) ? 1.f : 20.f;
5354 if (pulse <= 1.0f || pulse >= 2000.0f)
5370 if (force < 1.f || force > 20.f)
5372 std::stringstream msg;
5373 msg <<
"Clamping 'regulating_force' value '" << force <<
"' to allowed range <1 - 20>";
5375 force = (force < 1.f) ? 1.f : 20.f;
5386 if (pulse <= 1.0f || pulse >= 2000.0f)
5417 m_actor->
ar_engine->
SetTurboOptions(def.
version, def.
tinertiaFactor, def.
nturbos, def.
param1, def.
param2, def.
param3, def.
param4, def.
param5, def.
param6, def.
param7, def.
param8, def.
param9, def.
param10, def.
param11);
5494 std::stringstream msg;
5495 msg <<
"Failed to retrieve required node: " << node_ref.
ToString();
5524 if (node !=
nullptr)
5534 node_t* ar_nodes[] = {
nullptr,
nullptr};
5536 if (ar_nodes[0] ==
nullptr)
5542 if (ar_nodes[1] ==
nullptr)
5552 beam.
k = def.
defaults->GetScaledSpringiness();
5553 beam.
d = def.
defaults->GetScaledDamping();
5561 float beam_strength = def.
defaults->GetScaledBreakingThreshold();
5680 if (beam_defaults->_is_user_defined)
5682 default_deform = beam_defaults->deformation_threshold;
5683 if (!beam_defaults->_enable_advanced_deformation && default_deform <
BEAM_DEFORM)
5688 if (beam_defaults->_is_plastic_deform_coef_user_defined && beam_defaults->plastic_deform_coef >= 0.f)
5695 if (default_deform < beam_creak)
5697 default_deform = beam_creak;
5700 float deformation_threshold = default_deform * beam_defaults->scale.deformation_threshold_constant;
5709 std::string material_name = material_override;
5710 if (material_name.empty())
5714 material_name =
"tracks/Chrome";
5718 material_name = beam_defaults->beam_material_name;
5723 auto material = it->second;
5726 material_name = material->getName();
5740 entity->setMaterialName(material_name);
5743 beamx.
rod_diameter_mm = uint16_t(beam_defaults->visual_beam_diameter * 1000.f);
5753 beamx.
rod_scenenode->setScale(beam_defaults->visual_beam_diameter, -1, beam_defaults->visual_beam_diameter);
5757 catch (Ogre::Exception& e)
5766 beam.
L = beam_length;
5767 beam.
refL = beam_length;
5790 txt <<
": " << text;
5795 cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_ERROR;
5799 cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_WARNING;
5803 cm_type = RoR::Console::MessageType::CONSOLE_SYSTEM_NOTICE;
5817 bool is_imported = node_ref.GetImportState_IsValid();
5818 bool is_named = (is_imported ? node_ref.GetImportState_IsResolvedNamed() : node_ref.GetRegularState_IsNamed());
5827 std::stringstream msg;
5828 msg <<
"Failed to resolve node-ref (node not found):" << node_ref.
ToString();
5839 std::stringstream msg;
5865 if (node ==
nullptr)
5867 std::stringstream msg;
5868 msg <<
"Required node not found: " << node_ref.
ToString();
5878 std::stringstream msg;
5879 msg <<
"Attempt to add node with 'INVALID' flag: " <<
id.ToString() <<
" (number of nodes at this point: " <<
m_actor->
ar_num_nodes <<
")";
5881 return std::make_pair(0,
false);
5884 if (
id.IsTypeNamed())
5887 auto insert_result =
m_named_nodes.insert(std::make_pair(
id.
Str(), new_index));
5888 if (! insert_result.second)
5890 std::stringstream msg;
5891 msg <<
"Ignoring named node! Duplicate name: " <<
id.Str() <<
" (number of nodes at this point: " <<
m_actor->
ar_num_nodes <<
")";
5893 return std::make_pair(0,
false);
5899 return std::make_pair(new_index,
true);
5901 if (
id.IsTypeNumbered())
5905 std::stringstream msg;
5906 msg <<
"Duplicate node number, previous definition will be overriden! - " <<
id.ToString() <<
" (number of nodes at this point: " <<
m_actor->
ar_num_nodes <<
")";
5912 return std::make_pair(new_index,
true);
5915 throw Exception(
"Invalid Node::Id without type flags!");
5920 std::pair<unsigned int, bool> inserted_node =
AddNode(def.
id);
5921 if (! inserted_node.second)
5927 node.
pos = inserted_node.first;
6061 if (exhaust.
smoker ==
nullptr)
6069 exhaust.
smoker->setMaterialName(mat->getName(), mat->getGroup());
6100 for (
unsigned int i = 0; i < 8; i++)
6121 Ogre::Vector3
const & position,
6122 std::shared_ptr<RigDef::NodeDefaults> node_defaults
6139 Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(def.
material_name);
6146 std::stringstream msg;
6147 msg <<
"Material '" << def.
material_name <<
"' defined in section 'globals' not found. Trying material 'tracks/transred'";
6163 std::stringstream msg;
6164 msg <<
"Axle limit (" <<
MAX_WHEELS/2 <<
") exceeded";
6175 std::stringstream msg;
6187 std::stringstream msg;
6200 std::stringstream msg;
6212 std::stringstream msg;
6213 msg <<
"Cab limit (" <<
MAX_CABS <<
") exceeded";
6224 std::stringstream msg;
6236 std::stringstream msg;
6248 std::stringstream msg;
6434 Ogre::String index_str =
TOSTRING(i+1);
6502 for (
auto& def: module->materialflarebindings)
6504 if (def.material_name == material_name)
6517 for (
auto& def: module->videocameras)
6519 if (def.material_name == material_name)
6537 return lookup_res->second.material;
6543 if (mat_lookup_name ==
"mirror")
6548 static int mirror_counter = 0;
6549 const std::string new_mat_name = this->
ComposeName(
"RenderMaterial", mirror_counter);
6551 lookup_entry.
material = Ogre::MaterialManager::getSingleton().getByName(
"mirror")->clone(new_mat_name,
true, mat_lookup_rg);
6559 if (videocam_def !=
nullptr)
6561 Ogre::MaterialPtr video_mat_shared;
6565 video_mat_shared = found_managedmat->second;
6569 video_mat_shared = Ogre::MaterialManager::getSingleton().getByName(mat_lookup_name);
6572 if (video_mat_shared)
6576 lookup_entry.
material = video_mat_shared->clone(video_mat_name,
true, mat_lookup_rg);
6582 std::stringstream msg;
6583 msg <<
"VideoCamera material '" << mat_lookup_name <<
"' not found! Ignoring videocamera.";
6590 if (mat_flare_def !=
nullptr)
6600 auto skin_res = skin_def->replace_materials.find(mat_lookup_name);
6601 if (skin_res != skin_def->replace_materials.end())
6603 Ogre::MaterialPtr skin_mat = Ogre::MaterialManager::getSingleton().getByName(
6607 lookup_entry.
material = skin_mat->clone(this->
ComposeName(skin_mat->getName()),
true, mat_lookup_rg);
6613 std::stringstream buf;
6617 <<
"')! Ignoring it...";
6628 lookup_entry.
material = mmat_res->second;
6633 Ogre::MaterialPtr orig_mat = Ogre::MaterialManager::getSingleton().getByName(mat_lookup_name, mat_lookup_rg);
6636 std::stringstream buf;
6637 buf <<
"Material doesn't exist:" << mat_lookup_name;
6639 return Ogre::MaterialPtr();
6642 lookup_entry.
material = orig_mat->clone(this->
ComposeName(orig_mat->getName()),
true, mat_lookup_rg);
6654 for (
auto& technique: lookup_entry.
material->getTechniques())
6656 for (
auto& pass: technique->getPasses())
6658 for (
auto& tex_unit: pass->getTextureUnitStates())
6661 if (tex_unit->getTextureName() ==
"dashtexture")
6666 std::stringstream msg;
6667 msg <<
"Warning: '" << mat_lookup_name
6668 <<
"' references 'dashtexture', but Renderdash isn't created yet! Texture will be blank.";
6679 const size_t num_frames = tex_unit->getNumFrames();
6680 for (
size_t i = 0; i < num_frames; ++i)
6689 Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().getByName(
6697 tex = Ogre::TextureManager::getSingleton().create(
6700 tex_unit->_setTexturePtr(tex, i);
6704 tex_unit->setFrameTextureName(query->second, (
unsigned int)i);
6716 catch (Ogre::Exception& e)
6718 std::stringstream msg;
6719 msg <<
"Exception while customizing material \"" << mat_lookup_name <<
"\", message: " << e.getFullDescription();
6722 return Ogre::MaterialPtr();
6729 static unsigned int simple_mat_counter = 0;
6731 newmat->getTechnique(0)->getPass(0)->setAmbient(color);
6767 size_t num_sub_entities = ent->getNumSubEntities();
6768 for (
size_t i = 0; i < num_sub_entities; i++)
6770 Ogre::SubEntity* subent = ent->getSubEntity(i);
6771 subent->setMaterial(mat);
6778 size_t subent_max = ent->getNumSubEntities();
6779 for (
size_t i = 0; i < subent_max; ++i)
6781 Ogre::SubEntity* subent = ent->getSubEntity(i);
6783 if (subent->getMaterial())
6788 subent->setMaterial(own_mat);
6802 if (entry.second.material_flare_def !=
nullptr)
6805 entry.second.material_flare_def->flare_number, entry.second.material);
6810 entry.second.material, entry.second.mirror_prop_type, entry.second.mirror_prop_scenenode);
6812 else if (entry.second.video_camera_def !=
nullptr)
6828 for (
auto& gs: module->guisettings)
6830 if (gs.key ==
"dashboard")
6834 else if (gs.key ==
"texturedashboard")
6866 mat->getNumTechniques() > 0 &&
6867 mat->getTechnique(0)->getNumPasses() > 0 &&
6868 mat->getTechnique(0)->getPass(0)->getNumTextureUnitStates() > 0 &&
6869 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getNumFrames() > 0)
6872 Ogre::TextureManager::getSingleton().getByName(
6876 catch (Ogre::Exception& e)
6879 "Failed to load `help` material '" +
m_help_material_name +
"', message:" + e.getFullDescription());
6888 const float eps = 0.001f;
6891 Ogre::Plane pl = Ogre::Plane((ax1 - ax2).normalisedCopy(), 0);
6897 float a1len = a1.normalise();
6898 float a2len = a2.normalise();
6899 float a3len = a3.normalise();
6900 float a4len = a4.normalise();
6901 if ((std::max(a1len, a3len) / std::min(a1len, a3len) > 1.f + eps) ||
6902 (std::max(a2len, a4len) / std::min(a2len, a4len) > 1.f + eps))
6912 float b1len = b1.normalise();
6913 float b2len = b2.normalise();
6914 float b3len = b3.normalise();
6915 float b4len = b4.normalise();
6916 if ((std::max(b1len, b3len) / std::min(b1len, b3len) > 1.f + eps) ||
6917 (std::max(b2len, b4len) / std::min(b2len, b4len) > 1.f + eps))
6923 float rot1 = a1.dotProduct(b1);
6924 float rot2 = a2.dotProduct(b2);
6925 float rot3 = a3.dotProduct(b3);
6926 float rot4 = a4.dotProduct(b4);
6927 if ((std::max(rot1, rot2) / std::min(rot1, rot2) > 1.f + eps) ||
6928 (std::max(rot2, rot3) / std::min(rot2, rot3) > 1.f + eps) ||
6929 (std::max(rot3, rot4) / std::min(rot3, rot4) > 1.f + eps) ||
6930 (std::max(rot4, rot1) / std::min(rot4, rot1) > 1.f + eps))
6941 Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().create(
6942 "VideoCamDebugMat-" +
TOSTRING(
counter), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
6944 mat->getTechnique(0)->getPass(0)->createTextureUnitState();
6945 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureFiltering(Ogre::TFO_ANISOTROPIC);
6946 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureAnisotropy(3);
6947 mat->setLightingEnabled(
false);
6948 mat->setReceiveShadows(
false);
6951 mo->begin(mat->getName(), Ogre::RenderOperation::OT_LINE_LIST);
6952 Ogre::ColourValue pos_mark_col(1.f, 0.82f, 0.26f);
6953 Ogre::ColourValue dir_mark_col(0.f, 1.f, 1.f);
6954 const float pos_mark_len = 0.8f;
6955 const float dir_mark_len = 4.f;
6957 mo->position(pos_mark_len,0,0);
6958 mo->colour(pos_mark_col);
6959 mo->position(-pos_mark_len,0,0);
6960 mo->colour(pos_mark_col);
6962 mo->position(0,pos_mark_len,0);
6963 mo->colour(pos_mark_col);
6964 mo->position(0,-pos_mark_len,0);
6965 mo->colour(pos_mark_col);
6967 mo->position(0,0,pos_mark_len);
6968 mo->colour(pos_mark_col);
6969 mo->position(0,0,0);
6970 mo->colour(pos_mark_col);
6972 mo->position(0,0,-dir_mark_len);
6973 mo->colour(dir_mark_col);
6974 mo->position(0,0,0);
6975 mo->colour(dir_mark_col);
7009 float rotation_z = def->
rotation.z + 180;
7013 rotation_z += 180.0f;
7016 = Ogre::Quaternion(Ogre::Degree(rotation_z), Ogre::Vector3::UNIT_Z)
7017 * Ogre::Quaternion(Ogre::Degree(def->
rotation.y), Ogre::Vector3::UNIT_Y)
7018 * Ogre::Quaternion(Ogre::Degree(def->
rotation.x), Ogre::Vector3::UNIT_X);
7051 vcam.
vcam_render_tex = Ogre::TextureManager::getSingleton().createManual(
7053 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
7059 Ogre::TU_RENDERTARGET);
7078 vcam.
vcam_material->getTechnique(0)->getPass(0)->setLightingEnabled(
false);
7084 vp->setClearEveryFrame(
true);
7088 vp->setOverlaysEnabled(
false);
7094 vcam.
vcam_material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureUScale(-1);
7100 vp->setClearEveryFrame(
true);
7104 vp->setOverlaysEnabled(
false);
7118 catch (std::exception & ex)
7131 static int mprop_counter = 0;
7154 vcam.
vcam_render_tex = Ogre::TextureManager::getSingleton().createManual(
7155 this->
ComposeName(
"texture @ mirror", mprop_counter)
7162 , Ogre::TU_RENDERTARGET);
7179 v->setClearEveryFrame(
true);
7181 v->setOverlaysEnabled(
false);
7186 vcam.
vcam_material->getTechnique(0)->getPass(0)->setLightingEnabled(
false);
7191 catch (std::exception & ex)
7206 catch (Ogre::Exception& ogre_e)
7211 <<
") " << ogre_e.getFullDescription();
7215 catch (std::exception& std_e)
7230 Ogre::NameValuePairList params;
7232 params[
"templateName"] = template_name;
7235 name, Ogre::ParticleSystemFactory::FACTORY_TYPE_NAME, ¶ms);
7236 Ogre::ParticleSystem* psys =
static_cast<Ogre::ParticleSystem*
>(obj);
7240 for (
size_t i = 0; i < psys->getNumEmitters(); i++)
7242 psys->getEmitter(i)->setEnabled(
false);
7264 Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(
m_cab_material_name);
7273 char transmatname[256];
7274 static int trans_counter = 0;
7276 Ogre::MaterialPtr transmat=mat->clone(transmatname);
7277 if (mat->getTechnique(0)->getNumPasses()>1)
7279 transmat->getTechnique(0)->removePass(1);
7281 transmat->getTechnique(0)->getPass(0)->setAlphaRejectSettings(Ogre::CMPF_LESS_EQUAL, 128);
7282 transmat->getTechnique(0)->getPass(0)->setDepthWriteEnabled(
false);
7283 if (transmat->getTechnique(0)->getPass(0)->getNumTextureUnitStates()>0)
7285 transmat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureFiltering(Ogre::TFO_NONE);
7287 transmat->compile();
7291 char backmatname[256];
7292 static int back_counter = 0;
7294 Ogre::MaterialPtr backmat=mat->clone(backmatname);
7295 if (mat->getTechnique(0)->getNumPasses()>1)
7297 backmat->getTechnique(0)->removePass(1);
7299 if (transmat->getTechnique(0)->getPass(0)->getNumTextureUnitStates()>0)
7301 backmat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setColourOperationEx(
7305 Ogre::ColourValue(0,0,0),
7306 Ogre::ColourValue(0,0,0)
7311 backmat->setReceiveShadows(
false);
7317 char cab_material_name_cstr[1000] = {};
7319 std::string mesh_name = this->
ComposeName(
"mesh @ cab");
7327 cab_material_name_cstr,
7334 Ogre::Entity *ec =
nullptr;
7341 cab_scene_node->attachObject(ec);
7354 catch (Ogre::Exception& e)
7372 Ogre::Technique* tech = m->getTechnique(0);
7375 Ogre::Pass* p = tech->getPass(0);
7380 p->setSelfIllumination(Ogre::ColourValue::ZERO);
7410 Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().load(
7416 tus->setTexture(tex);
static const BitMask_t OPTION_u_INPUT_AILERON_ELEVATOR
unsigned int contract_key
#define ROR_ASSERT(_EXPR)
Game state manager and message-queue provider.
int16_t nd_coll_bbox_id
Optional attribute (-1 = none) - multiple collision bounding boxes defined in truckfile.
static const BitMask64_t SOURCE_EVENT
std::shared_ptr< BeamDefaults > beam_defaults
float ar_anim_previous_crank
For 'animator' with flag 'torque'.
void ResolveUnwantedAndTweakedElements(TuneupDefPtr &tuneup, CacheEntryPtr &addonpart_entry)
Evaluates 'addonpart_unwanted_*' elements, respecting 'protected_*' directives in the tuneup.
void setInertialReferences(node_t *refl, node_t *refr, node_t *refb, node_t *refc)
DifferentialTypeVec options
Order matters!
void ProcessWing(RigDef::Wing &def)
std::string * ar_nodes_name
Name in truck file, only if defined with 'nodes2'.
static const int MAX_COMMANDS
maximum number of commands per actor
int tr_ax_2
This axle is only driven in 4WD mode.
node_t * wh_rim_nodes[50]
void LoadAssetPack(CacheEntryPtr &t_dest, Ogre::String const &assetpack_filename)
Adds asset pack to the requesting cache entry's resource group.
float spring_out
spring value applied when shock extending
static const BitMask64_t SOURCE_ANGLE_OF_ATTACK
static const BitMask_t OPTION_c_COMMAND_STYLE
std::vector< Ogre::AxisAlignedBox > ar_collision_bounding_boxes
smart bounding boxes, used for determining the state of an actor (every box surrounds only a subset o...
std::shared_ptr< RigDef::Document::Module > m_current_module
For resolving addonparts.
bool cc_mode
Cruise Control.
Ogre::Quaternion vcam_rotation
static const BitMask_t OPTION_PITCH
const PropAnimFlag_t PROP_ANIM_FLAG_AIRSPEED
static const BitMask_t OPTION_e_INPUT_ELEVATOR
const PropAnimFlag_t PROP_ANIM_FLAG_TORQUE
int last_debug_state
smart debug output
int ar_num_contactable_nodes
Total number of nodes which can contact ground or cabs.
std::shared_ptr< BeamDefaults > beam_defaults
SoundScriptManager * GetSoundScriptManager()
static const BitMask_t CONSTRAINT_ATTACH_FOREIGN
BitMask_t constraint_flags
static const BitMask64_t SOURCE_FLAP
RoR::CmdKeyInertia command_inertia
const PropAnimFlag_t PROP_ANIM_FLAG_SHIFTER
'shifterman1, shifterman2, sequential, shifterlin, autoshifterlin'; animOpt3: see RoR::ShifterPropAni...
static const BitMask64_t SOURCE_VERTICAL_VELOCITY
float m_odometer_user
GUI state.
static const BitMask_t OPTION_A_INV_TRIGGER_BLOCKER
float damp_out_fast
Damping value applied when shock is commpressing faster than split out velocity.
bool nd_contacter
Attr; User-defined.
SoundScriptInstancePtr ssi
NodeNum_t ar_main_camera_node_pos
Sim attr; ar_camera_node_pos[0] >= 0 ? ar_camera_node_pos[0] : 0.
VehicleAIPtr ar_vehicle_ai
bool CheckSubmeshLimit(unsigned int count)
float upper_limit
The upper limit for the animation.
float extension_break_limit
Node::Ref blade_tip_nodes[4]
static const BitMask_t OPTION_p_10xTOUGHER
Ogre::String dname
name parsed from the file
std::vector< SlideNode > m_slidenodes
all the SlideNodes available on this actor
std::vector< Node::Ref > nodes
const PropAnimMode_t PROP_ANIM_MODE_OFFSET_X
@ LIGHTMASK_CUSTOM9
custom light 9 on
void ProcessHook(RigDef::Hook &def)
bool cmb_is_force_restricted
Attribute defined in truckfile.
static const BitMask_t SOURCE_AERO_TORQUE
static void AddSoundSource(ActorPtr const &vehicle, SoundScriptInstancePtr sound_script, NodeNum_t node_index, int type=-2)
NodeNum_t ar_camera_node_dir[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; back node.
void ProcessHydro(RigDef::Hydro &def)
std::shared_ptr< BeamDefaults > beam_defaults
CameraSettings camera_settings
static const BitMask_t OPTION_x_EXHAUST_POINT
Legacy parser resolved references on-the-fly and the condition to check named nodes was "are there an...
RigDef::Keyword m_current_keyword
For error reports.
std::shared_ptr< Inertia > inertia_defaults
CameraMode_t pp_camera_mode_orig
Dynamic visibility mode {0 and higher = cinecam index}.
const PropAnimFlag_t PROP_ANIM_FLAG_AIRBRAKE
bool nd_immovable
Attr; User-defined.
@ VCAM_ROLE_TRACKING_VIDEOCAM
const PropAnimFlag_t PROP_ANIM_FLAG_AOA
void ProcessSubmesh(RigDef::Submesh &def)
int ar_buoycabs[MAX_CABS]
void ProcessGlobals(RigDef::Globals &def)
static const BitMask_t OPTION_SHIFT_BACK_FORTH
std::string m_custom_resource_group
Ogre::BillboardSet * bbs
This remains nullptr if removed via addonpart_unwanted_flare or Tuning UI.
std::shared_ptr< Inertia > inertia_defaults
bool wasDashboardHudLoaded() const
static const float NODE_FRICTION_COEF_DEFAULT
static const BitMask64_t SOURCE_AUTOSHIFTERLIN
void ProcessFlare2(RigDef::Flare2 &def)
float default_braking_force
bool option_o_1press_center
static const BitMask_t SOURCE_AERO_PITCH
node_t * m_fusealge_back
Physics attr; defined in truckfile.
collcab_rate_t ar_inter_collcabrate[MAX_CABS]
beam_t & GetBeam(unsigned int index)
NodeNum_t ar_extern_camera_node
std::shared_ptr< NodeDefaults > node_defaults
int control_number
Only 'u' type flares.
void ProcessRope(RigDef::Rope &def)
WingControlSurface control_surface
bool CheckCameraRailLimit(unsigned int count)
void UpdateSimDataBuffer()
Copies sim. data from Actor to GfxActor for later update.
@ TRUCK
its a truck (or other land vehicle)
ExtCameraMode ar_extern_camera_mode
static const BitMask_t OPTION_s_SOFT_BUMP_BOUNDS
Visuals of softbody beam (beam_t struct); Partially updated along with SimBuffer.
Ogre::MaterialPtr vcam_material
void SetSimpleDelay(RoR::CmdKeyInertiaConfig &cfg, float start_delay, float stop_delay, std::string start_function, std::string stop_function)
Ogre::RenderWindow * CreateCustomRenderWindow(std::string const &name, int width, int height)
void ProcessSoundSource(RigDef::SoundSource &def)
void SetEngineOptions(float einertia, char etype, float eclutch, float ctime, float stime, float pstime, float irpm, float srpm, float maximix, float minimix, float ebraking)
@ LIGHTMASK_CUSTOM4
custom light 4 on
Ogre::String start_function
static const int MAX_CLIGHTS
See RoRnet::Lightmask and enum events in InputEngine.h.
unsigned int texture_width
float alb_pulse_time
Anti-lock brake attribute;.
@ SHOCK_FLAG_TRG_BLOCKER_A
int spaceCurveEvenly(Ogre::SimpleSpline *spline)
Spaces the points of a spline evenly; this is needed for the correct calculation of the Ogre simple s...
std::shared_ptr< BeamDefaults > beam_defaults
RigDef::MaterialFlareBinding * FindFlareBindingForMaterial(std::string const &material_name)
Returns NULL if none found.
void ConfigureSections(Ogre::String const §ionconfig, RigDef::DocumentPtr def)
float springin
shocks2 & shocks3
const PropAnimFlag_t PROP_ANIM_FLAG_BRAKE
int m_num_wheel_diffs
Physics attr.
WheelID_t AddWheel2(RigDef::Wheel2 &wheel_2_def)
float post_shift_time
Seconds.
static const BitMask_t OPTION_R_ACTIVE_RIGHT
CameraManager * GetCameraManager()
static const BitMask_t SOURCE_AERO_RPM
Ogre::Vector3 AbsPosition
absolute position in the world (shaky)
TorqueCurve * getTorqueCurve()
const std::string & Str() const
float pp_beacon_rot_angle[4]
Radians.
void ProcessMinimass(RigDef::Minimass &def)
bool m_trigger_debug_enabled
Logging state.
float long_bound
Maximum extension. The longest length a shock can be, as a proportion of its original length....
void ProcessEngine(RigDef::Engine &def)
void ProcessGuiSettings(RigDef::GuiSettings &def)
const PropAnimMode_t PROP_ANIM_MODE_ROTA_Z
int mode
A special constant or cinecam index.
void setMaterialName(Ogre::String m)
static const BitMask_t OPTION_SEQUENTIAL_SHIFT
bool wasDashboardRttLoaded() const
static const float BEAM_DEFORM
RigDef::DocumentPtr m_file
float lower_limit
The lower limit for the animation.
bool trigger_enabled
general trigger,switch and blocker state
std::vector< Wheel > wheels
int dashboard_link
Only 'd' type flares, valid values are DD_*.
static const BitMask_t OPTION_ALTIMETER_1K
const PropAnimFlag_t PROP_ANIM_FLAG_DASHBOARD
Used with dashboard system inputs, see enum DashData in file DashBoardManager.h.
std::vector< float > gear_ratios
bool ar_collision_relevant
Physics state;.
void ProcessBrakes(RigDef::Brakes &def)
Ogre::TexturePtr vcam_render_tex
bool sn_attach_foreign
Attach/detach to rails only on other vehicles.
Ogre::Entity * GetTireEntity()
std::string ToString() const
Ogre::SimpleSpline * getUsedSpline()
Returns the used spline.
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
float cc_target_rpm
Cruise Control.
A series of RailSegment-s for SlideNode to slide along. Can be closed in a loop.
@ LOADDASHBOARD_RTT_TEXTURE
Will be drawn to texture. Unless STACKABLE, it prevents the default dashboard from loading.
Ogre::SceneNode * m_particles_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
CameraSettings camera_settings
float split_vel_out
Split velocity in (m/s) - threshold for slow / fast damping during extension.
void CheckAndLoadFlexbodyCache()
@ LIGHTMASK_CUSTOM10
custom light 10 on
static const BitMask_t OPTION_SHIFT_LEFT_RIGHT
Ogre::SceneNode * m_actor_grouping_scenenode
Topmost common parent; this isn't used for moving things, just helps developers inspect the scene gra...
float tc_ratio
Regulating force.
static const BitMask_t MODE_BOUNCE
Ogre::Entity * getEntity()
std::vector< Ogre::SceneNode * > m_deletion_scene_nodes
For unloading vehicle; filled at spawn.
std::vector< Shock2 > shocks2
static const BitMask64_t SOURCE_TACHO
std::vector< Command2 > commands2
static bool isPropAnyhowRemoved(TuneupDefPtr &tuneup_def, PropID_t prop_id)
static const BitMask_t OPTION_PITCH
const PropAnimMode_t PROP_ANIM_MODE_ROTA_X
int m_num_axle_diffs
Physics attr.
bool sn_attach_self
Attach/detach to rails on the current vehicle only.
Differential * m_wheel_diffs[MAX_WHEELS/2]
Physics.
float m_fusealge_width
Physics attr; defined in truckfile.
float hb_ref_length
Idle length in meters.
Ogre::String damaged_diffuse_map
static const BitMask_t OPTION_CLUTCH
AppContext * GetAppContext()
static const NodeNum_t NODENUM_INVALID
std::vector< UniqueCommandKeyPair > ar_unique_commandkey_pairs
UI helper for displaying command control keys to user (must be built at spawn).
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])".
void ProcessExtCamera(RigDef::ExtCamera &def)
bool nd_contactable
Attr; This node will be treated as contacter on inter truck collisions.
void ProcessRotator(RigDef::Rotator &def)
std::vector< Wing > wings
Ogre::Vector3 * ar_nodes_spawn_offsets
Relative positions (incl. Tuning system tweaks) from the definition file, for spawn-like resetting (i...
ground_model_t * defaultgm
void ProcessHelp(RigDef::Help &def)
static const int8_t INVALID_BBOX
Truck file format(technical spec)
void SetBeamDeformationThreshold(beam_t &beam, std::shared_ptr< RigDef::BeamDefaults > beam_defaults)
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'
bool nd_override_mass
User defined attr; mass is user-specified rather than calculated (override the calculation)
static const BitMask_t OPTION_FLAP
bool nx_no_particles
User-defined attr; disable all particles.
CVar * diag_simple_materials
Ogre::String particle_system_name
void AddExhaust(NodeNum_t emitter_node_idx, NodeNum_t direction_node_idx)
void ProcessShock(RigDef::Shock &def)
std::shared_ptr< BeamDefaults > beam_defaults
static const BitMask_t CONSTRAINT_ATTACH_SELF
static const BitMask_t OPTION_ANGLE_OF_ATTACK
static const BitMask64_t SOURCE_PARKING
int longbound_trigger_action
int ar_buoycab_types[MAX_CABS]
void ProcessLockgroup(RigDef::Lockgroup &lockgroup)
int m_proped_wheel_pairs[MAX_WHEELS]
Physics attr; For inter-differential locking.
void CreateWheelSkidmarks(WheelID_t wheel_index)
Ogre::SceneNode * wx_scenenode
Consists of static mesh, representing the rim, and dynamic mesh, representing the tire.
@ LIGHTMASK_REVERSE
reverse light on
Ogre::MaterialPtr m_simple_material_base
bool uses_inertia
Only 'flares3'.
RigDef::DocumentPtr m_definition
CVar * gfx_particles_mode
static const BitMask64_t SOURCE_BOAT_RUDDER
bool sl_enabled
Speed limiter;.
NodeNum_t FindNodeIndex(RigDef::Node::Ref &node_ref, bool silent=false)
BackmeshType backmesh_type
float spring_in
Spring value applied when the shock is compressing.
void AddCurveSample(float rpm, float progress, Ogre::String const &model=customModel)
Adds a point to the torque curve graph.
CVar * gfx_enable_videocams
int pos
Index into ar_ropables.
const char * KeywordToString(Keyword keyword)
void ProcessCamera(RigDef::Camera &def)
std::vector< Rope > ropes
float cmb_engine_coupling
Attr from truckfile.
int m_masscount
Physics attr; Number of nodes loaded with l option.
static const BitMask_t OPTION_AIR_BRAKE
float trigger_boundary_t
optional value to tune trigger_switch_state autorelease
NodeNum_t vcam_node_center
static const BitMask_t OPTION_m_METRIC
void SetVisible(bool visible)
void ProcessContacter(RigDef::Node::Ref &node_ref)
void SetCurrentKeyword(RigDef::Keyword keyword)
static const BitMask_t OPTION_L_ACTIVE_LEFT
void LogFormat(const char *format,...)
Improved logging utility. Uses fixed 2Kb buffer.
std::vector< Node::Range > rail_node_ranges
static const BitMask64_t SOURCE_PITCH
std::vector< Airbrake > airbrakes
void ProcessMeshWheel2(RigDef::MeshWheel2 &def)
static const BitMask_t SOURCE_AERO_STATUS
static const BitMask_t OPTION_BOAT_THROTTLE
void ProcessFusedrag(RigDef::Fusedrag &def)
const PropAnimMode_t PROP_ANIM_MODE_NOFLIP
std::vector< Node::Ref > nodes
Ogre::TexturePtr getTexture()
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
CVar * ui_default_boat_dash
string; name of the '.dashboard' file in modcache.
std::vector< Node > nodes
Ogre::Vector3 pp_offset_orig
Used with ANIM_FLAG_OFFSET*.
std::string vcam_mat_name_orig
For display in Tuning UI: Original material name from rig-def file, without per-actor stamping.
System integration layer; inspired by OgreBites::ApplicationContext.
static const BitMask_t OPTION_n_INPUT_NORMAL
void ProcessAirbrake(RigDef::Airbrake &def)
void ProcessTorqueCurve(RigDef::TorqueCurve &def)
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
float m_turbo_inertia_factor
std::vector< hook_t > ar_hooks
User input state for animated props with 'source:event'.
static const BitMask64_t SOURCE_ALTIMETER_10K
int CParticleID_t
Index into GfxActor::m_cparticles, use RoR::CPARTICLEID_INVALID as empty value.
CVar * sim_no_self_collisions
float hk_min_length
Absolute value in meters.
unsigned int spin_right_key
std::shared_ptr< RigDef::Document::Module > TransformToRigDefModule(CacheEntryPtr &addonpart_entry)
transforms the addonpart to RigDef::File::Module (fake 'section/end_section') used for spawning.
Ogre::SceneNode * mirror_prop_scenenode
This class loads and processes a torque curve for a vehicle.
bool tr_4wd_mode
Enables 4WD mode.
std::vector< wheeldetacher_t > ar_wheeldetachers
float ComputeWingArea(Ogre::Vector3 const &ref, Ogre::Vector3 const &x, Ogre::Vector3 const &y, Ogre::Vector3 const &aref)
Ogre::String resource_group
Resource group of the loaded bundle. Empty if not loaded yet.
static const BitMask_t OPTION_p_NO_PARTICLES
static const BitMask_t OPTION_u_INVULNERABLE
@ LIGHTMASK_CUSTOM7
custom light 7 on
bool m_generate_wing_position_lights
std::vector< tie_t > ar_ties
Ogre::RenderTexture * vcam_render_target
static CameraMode_t CAMERA_MODE_ALWAYS_HIDDEN
float dampout
shocks2 & shocks3
float sl_speed_limit
Speed limiter;.
float cc_target_speed_lower_limit
Cruise Control.
void ConfigureAddonParts(TuneupDefPtr &tuneup_def)
A visual mesh, forming a chassis for softbody actor At most one instance is created per actor.
bool nx_no_sparks
User-defined attr;.
Ogre::Real wh_mass
Total rotational mass of the wheel.
std::string getTruckFileResourceGroup()
static const BitMask_t OPTION_TORQUE
NodeNum_t ar_main_camera_node_dir
Sim attr; ar_camera_node_dir[0] >= 0 ? ar_camera_node_dir[0] : 0.
uint16_t rod_diameter_mm
Diameter in millimeters.
const PropAnimFlag_t PROP_ANIM_FLAG_PBRAKE
RoR::FlexFactory m_flex_factory
bool ar_hide_in_actor_list
Hide in list of spawned actors (available in top menubar). Useful for fixed-place machinery,...
std::set< std::string > use_addonparts
Addonpart filenames.
Designed to be run on main/rendering loop (FPS)
static const BitMask_t MODE_EVENT_LOCK
static const BitMask_t OPTION_SPEEDO
NodeNum_t vcam_node_dir_y
static Ogre::Vector3 getTweakedPropOffset(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
static Ogre::Vector3 getTweakedPropRotation(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
const PropAnimFlag_t PROP_ANIM_FLAG_ARUDDER
std::map< std::string, Ogre::MaterialPtr > m_managed_materials
Ogre::Vector3 RelPosition
relative to the local physics origin (one origin per actor) (shaky)
const PropAnimFlag_t PROP_ANIM_FLAG_RPM
@ VCAM_ROLE_TRACKING_MIRROR_NOFLIP
A MIRROR_NOFLIP(2) with tracking node set.
static const BitMask_t OPTION_BRAKES
void SetBeamSpring(beam_t &beam, float spring)
char pp_beacon_type
Special prop: beacon {0 = none, 'b' = user-specified, 'r' = red, 'p' = police lightbar,...
std::shared_ptr< commandbeam_state_t > cmb_state
static const BitMask64_t SOURCE_SHIFTERLIN
static const float HOOK_SPEED_DEFAULT
Ogre::SceneNode * vcam_debug_node
void ValidateRotator(int id, int axis1, int axis2, NodeNum_t *nodes1, NodeNum_t *nodes2)
static const BitMask64_t SOURCE_AIR_RUDDER
RigDef::VideoCamera * FindVideoCameraByMaterial(std::string const &material_name)
Returns NULL if none found.
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
const PropAnimFlag_t PROP_ANIM_FLAG_ALTIMETER
void CalcMemoryRequirements(ActorMemoryRequirements &req, RigDef::Document::Module *module_def)
bool IsValidAnyState() const
DashBoardManager * ar_dashboard
static const BitMask_t OPTION_m_NO_MOUSE_GRAB
static const BitMask64_t SOURCE_AIRSPEED
Skidmark * m_skid_trails[MAX_WHEELS *2]
Ogre::Vector3 pp_wheel_pos
const PropAnimMode_t PROP_ANIM_MODE_ROTA_Y
void setAutoMode(SimGearboxMode mode)
int di_idx_2
array location of wheel / axle 2
static const BitMask_t OPTION_B_TRIGGER_BLOCKER
bool pp_aero_propeller_spin
Special - blurred spinning propeller effect.
void _ProcessKeyInertia(RigDef::Inertia &inertia, RigDef::Inertia &inertia_defaults, RoR::CmdKeyInertia &contract_key, RoR::CmdKeyInertia &extend_key)
std::shared_ptr< BeamDefaults > beam_defaults
node_t & GetAndInitFreeNode(Ogre::Vector3 const &position)
float m_avg_proped_wheel_radius
Physics attr, filled at spawn - Average proped wheel radius.
static const BitMask64_t SOURCE_ELEVATOR
void AddDifferentialType(DiffType diff)
float animratio
A coefficient for the animation, prop degree if used with mode: rotation and propoffset if used with ...
void _ProcessSimpleInertia(RigDef::Inertia &def, RoR::SimpleInertia &obj)
int ExhaustID_t
Index into GfxActor::m_exhausts, use RoR::EXHAUSTID_INVALID as empty value.
Ogre::String predefined_func_name
ActorPtr rod_target_actor
@ LIGHTMASK_BLINK_LEFT
left blinker on
void ProcessAxle(RigDef::Axle &def)
Ogre::RenderWindow * vcam_render_window
int hb_anim_flags
Animators (beams updating length based on simulation variables)
Ogre::SceneManager * GetSceneManager()
static const BitMask64_t SOURCE_ROLL
void ProcessEngturbo(RigDef::Engturbo &def)
bool tc_nodash
Hide the dashboard indicator?
static const BitMask_t SOURCE_GEAR_FORWARD
Ogre::MaterialPtr m_cab_trans_material
const PropAnimFlag_t PROP_ANIM_FLAG_STEERING
static const BitMask_t OPTION_INVISIBLE
float damp_in
Damping value applied when the shock is compressing.
const PropAnimFlag_t PROP_ANIM_FLAG_GEAR
'gearreverse' (animOpt3=-1), 'gearneutral' (animOpt3=0), 'gear#' (animOpt3=#)
float damp_out
damping value applied when shock extending
float clutch_time
Seconds.
float spring_out
Spring value applied when shock extending.
void ProcessEngoption(RigDef::Engoption &def)
int ar_num_contacters
Total number of nodes which can selfcontact cabs.
float refL
reference length
bool CheckCabLimit(unsigned int count)
Airfoil * m_fusealge_airfoil
Physics attr; defined in truckfile.
@ FAULTY_MESH_PLACEHOLDER
static const BitMask_t MODE_ROTATION_Y
static const BitMask_t OPTION_RPM
Ogre::SceneNode * pp_wheel_scene_node
static const BitMask64_t SOURCE_AILERON
static const BitMask_t OPTION_g_INPUT_ELEVATOR_RUDDER
void ProcessShock3(RigDef::Shock3 &def)
RoR::VideoCamRole camera_role
bool m_has_command_beams
Physics attr;.
float ar_posnode_spawn_height
Ogre::String tyre_mesh_name
void AddMessage(Message type, Ogre::String const &text)
Maintenance.
std::vector< MeshWheel2 > meshwheels2
A land vehicle engine + transmission.
void ProcessAnimator(RigDef::Animator &def)
float short_bound
Maximum contraction. The shortest length the shock can be, as a proportion of its original length....
void addwash(int propid, float ratio)
static const BitMask_t OPTION_m_METRIC
Node::Ref alt_reference_node
float spring_rate
The 'stiffness' of the shock. The higher the value, the less the shock will move for a given bump.
void SetupNewEntity(Ogre::Entity *e, Ogre::ColourValue simple_color)
Full texture and material setup.
Ogre::ManualObject * CreateVideocameraDebugMesh()
void ProcessFlaregroupNoImport(RigDef::FlaregroupNoImport &def)
static std::string getTweakedFlexbodyMediaRG(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
Ogre::MaterialPtr InstantiateManagedMaterial(Ogre::String const &rg_name, Ogre::String const &source_name, Ogre::String const &clone_name)
#define BITMASK_SET_0(VAR, FLAGS)
std::shared_ptr< SkinDocument > SkinDocumentPtr
MeshObject * pp_wheel_mesh_obj
Simulation: An edge in the softbody structure.
Ogre::ParticleSystem * psys
AeroEngine * ar_aeroengines[MAX_AEROENGINES]
static const BitMask_t MODE_AUTO_ANIMATE
void ProcessShock2(RigDef::Shock2 &def)
static const BitMask_t OPTION_l_LOAD_WEIGHT
Ogre::Camera * GetCamera()
ManagedMaterialsOptions options
Ogre::MaterialPtr FindOrCreateCustomizedMaterial(const std::string &mat_lookup_name, const std::string &mat_lookup_rg)
@ SHOCK_FLAG_TRG_HOOK_LOCK
static void ResetUnwantedAndTweakedElements(TuneupDefPtr &tuneup)
int * ar_nodes_id
Number in truck file, -1 for nodes generated by wheels/cinecam.
RoR::Renderdash * m_oldstyle_renderdash
#define BITMASK_IS_0(VAR, FLAGS)
Screwprop * ar_screwprops[MAX_SCREWPROPS]
CVar * gfx_window_videocams
Ogre::String material_name
void CreateVideoCamera(RigDef::VideoCamera *def)
@ DD_PARKINGBRAKE
chassis pitch
static const BitMask_t OPTION_TORQUE
Ogre::SceneNode * m_vcams_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
NodeNum_t ResolveNodeRef(RigDef::Node::Ref const &node_ref)
bool CheckAeroEngineLimit(unsigned int count)
void ProcessMeshWheel(RigDef::MeshWheel &def)
ropable_t * rp_locked_ropable
std::vector< Cinecam > cinecam
NodeNum_t rod_node1
Node index - may change during simulation!
static const float DEFAULT_COLLISION_RANGE
CVar * gfx_alt_actor_materials
int VideoCameraID_t
Index into GfxActor::m_videocameras, use RoR::VIDEOCAMERAID_INVALID as empty value.
bool _has_load_weight_override
std::string dashboard_link
Only 'd' type flares.
std::vector< Wheel2 > wheels2
bool cmb_is_contraction
Attribute defined at spawn.
const PropAnimFlag_t PROP_ANIM_FLAG_AETORQUE
void ProcessRopable(RigDef::Ropable &def)
static const BitMask_t OPTION_i_INVISIBLE
std::vector< authorinfo_t > authors
static const BitMask_t OPTION_LONG_LIMIT
Ogre::SceneNode * smokeNode
static const BitMask_t OPTION_i_INVISIBLE
virtual int getNoderef()=0
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
static const BitMask64_t SOURCE_BOAT_THROTTLE
CVar * ui_default_truck_dash
string; name of the '.dashboard' file in modcache.
CVar * diag_log_beam_break
@ UNLOCKED
lock not locked
const PropAnimFlag_t PROP_ANIM_FLAG_PERMANENT
int ar_airbrake_intensity
Physics state; values 0-5.
static bool isManagedMatAnyhowRemoved(TuneupDefPtr &tuneup_def, const std::string &matname)
static const BitMask_t OPTION_ACCEL
Wrapper for classic c-string (local buffer) Refresher: strlen() excludes '\0' terminator; strncat() A...
node_t * m_fusealge_front
Physics attr; defined in truckfile.
CacheEntryPtr FindEntryByFilename(RoR::LoaderType type, bool partial, const std::string &_filename_maybe_bundlequalified)
Returns NULL if none found; "Bundle-qualified" format also specifies the ZIP/directory in modcache,...
NodeNum_t ar_camera_node_roll[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; left node.
TransferCase * m_transfer_case
Physics.
Ogre::Vector3 offset
gfx attribute
unsigned int texture_height
static const int DEFAULT_DETACHER_GROUP
std::vector< flare_t > ar_flares
float ti_min_length
Proportional to orig; length.
Ogre::String band_material_name
bool tc_notoggle
Disable in-game toggle?
static bool isFlexbodyAnyhowRemoved(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id)
static const BitMask64_t SOURCE_DIFFLOCK
static const BitMask64_t SOURCE_AIR_BRAKE
@ LIGHTMASK_CUSTOM3
custom light 3 on
static const float HOOK_FORCE_DEFAULT
unsigned int AddTyreBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
std::vector< CabTexcoord > m_oldstyle_cab_texcoords
void ProcessTurboprop2(RigDef::Turboprop2 &def)
wheel_t::BrakeCombo TranslateBrakingDef(RigDef::WheelBraking def)
int m_num_command_beams
TODO: Remove! Spawner context only; likely unused feature.
WheelID_t AddWheel(RigDef::Wheel &wheel)
Gfx attributes/state of a softbody node.
@ FAULTY_FORSET_PLACEHOLDER
@ ALL_VEHICLES_ALL_LIGHTS
All vehicles, all lights.
collcab_rate_t ar_intra_collcabrate[MAX_CABS]
float sbd_damp
set beam default for damping
void ProcessAuthor(RigDef::Author &def)
bool CheckTexcoordLimit(unsigned int count)
std::vector< Rotator2 > rotators2
A database of user-installed content alias 'mods' (vehicles, terrains...)
const PropAnimMode_t PROP_ANIM_MODE_AUTOANIMATE
int trigger_cmdshort
F-key for trigger injection shortbound-check.
float cmb_center_length
Attr computed at spawn.
bool cmb_needs_engine
Attribute defined in truckfile.
Ogre::ParticleSystem * CreateParticleSystem(std::string const &name, std::string const &template_name)
float cc_target_speed
Cruise Control.
Ogre::SceneNode * m_props_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
float load_weight_override
void ConfigureAssetPacks(ActorPtr actor, RigDef::DocumentPtr def)
static const BitMask_t OPTION_x_START_DISABLED
Ogre::Light * pp_beacon_light[4]
static const BitMask_t OPTION_a_INPUT_AILERON
void ProcessSpeedLimiter(RigDef::SpeedLimiter &def)
#define BITMASK_IS_1(VAR, FLAGS)
static const BitMask_t MODE_OFFSET_Z
std::string m_help_material_name
std::string vcam_off_tex_name
Used when videocamera is offline.
PointColDetector * m_inter_point_col_detector
Physics.
int setTorqueModel(Ogre::String name)
Sets the torque model which is used for the vehicle.
RigDef::VideoCamera * video_camera_def
static std::string getTweakedPropMedia(TuneupDefPtr &tuneup_entry, PropID_t prop_id, int media_idx, const std::string &orig_val)
std::shared_ptr< Inertia > inertia_defaults
std::vector< Animator > animators
TyrePressure & getTyrePressure()
const PropAnimFlag_t PROP_ANIM_FLAG_FLAP
static const BitMask_t OPTION_c_CONTACT
Node::Ref alt_orientation_node
const PropAnimFlag_t PROP_ANIM_FLAG_DIFFLOCK
std::vector< Trigger > triggers
void GetWheelAxisNodes(RigDef::BaseWheel &def, node_t *&out_node_1, node_t *&out_node_2)
static const float ROTATOR_TOLERANCE_DEFAULT
CVar * diag_log_beam_trigger
#define BITMASK_SET_1(VAR, FLAGS)
RoR::CmdKeyInertia hb_inertia
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
void ProcessFlare3(RigDef::Flare3 &def)
Ogre::String specular_map
const PropAnimFlag_t PROP_ANIM_FLAG_AESTATUS
static const int MAX_SUBMESHES
maximum number of submeshes per actor
float trigger_switch_state
needed to avoid doubleswitch, bool and timer in one
std::vector< RailSegment > rg_segments
static const int LOCKGROUP_NOLOCK
Ogre::Vector3 ar_origin
Physics state; base position for softbody nodes.
const char * ToCStr() const
void ProcessFlexbody(RigDef::Flexbody &def)
static const BitMask_t OPTION_ALTIMETER_10K
@ LOCAL_SLEEPING
sleeping (local) actor
CameraMode_t fb_camera_mode_active
Dynamic visibility mode {0 and higher = cinecam index}.
static const BitMask_t OPTION_STATUS
bool nd_cab_node
Attr; This node is part of collision triangle.
Ogre::Camera * vcam_ogre_camera
float cmb_speed
Attr; Rate of contraction/extension.
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
@ BEAM_VIRTUAL
Excluded from mass calculations, visuals permanently disabled.
bool nd_no_mouse_grab
Attr; User-defined.
static const int MAX_CAMERAS
maximum number of cameras per actor
Ogre::String rim_mesh_name
static const BitMask_t OPTION_ROLL
int trigger_cmdlong
F-key for trigger injection longbound-check.
void loadDashBoard(const std::string &filename, BitMask_t flags)
void ProcessFixedNode(RigDef::Node::Ref node_ref)
float spring_in
Spring value applied when the shock is compressing.
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
Ogre::Entity * abx_entity
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
SkinDocumentPtr skin_def
Cached skin info, added on first use or during cache rebuild.
Collisions * GetCollisions()
static const float HOOK_RANGE_DEFAULT
std::string getTruckFileName()
static const BitMask_t MODE_OFFSET_X
static const BitMask_t OPTION_BOAT_RUDDER
void SetNodes(NodeNum_t front, NodeNum_t back, NodeNum_t ref)
NodeNum_t pos
This node's index in Actor::ar_nodes array.
std::vector< std::string > m_description
bool nd_tyre_node
Attr; This node is part of a tyre (note some wheel types don't use rim nodes at all)
static const BitMask_t MODE_ROTATION_Z
beam_t & GetAndInitFreeBeam(node_t &node_1, node_t &node_2)
void ProcessScrewprop(RigDef::Screwprop &def)
static const BitMask_t OPTION_THROTTLE
static const BitMask_t OPTION_v_INPUT_InvAILERON_ELEVATOR
std::map< std::string, CustomMaterial > m_material_substitutions
Maps original material names (shared) to their actor-specific substitutes; There's 1 substitute per 1...
std::vector< Sample > samples
CVar * diag_log_beam_deform
#define SOUND_START(_ACTOR_, _TRIG_)
static const BitMask64_t SOURCE_STEERING_WHEEL
static const BitMask_t OPTION_TURBO
std::vector< Rotator > rotators
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'
const PropAnimFlag_t PROP_ANIM_FLAG_SIGNALSTALK
Turn indicator stalk position (-1=left, 0=off, 1=right)
int ar_collcabs[MAX_CABS]
node_t * wh_near_attach_node
A mesh attached to vehicle frame via 3 nodes.
@ VCAM_ROLE_MIRROR_NOFLIP
Same as VCAM_ROLE_MIRROR, but without flipping the texture horizontally (expects texcoords to be alre...
std::map< Ogre::String, unsigned int > m_named_nodes
std::vector< float > ar_minimass
minimum node mass in Kg
const PropAnimFlag_t PROP_ANIM_FLAG_VVI
float progress_factor_spring_out
Progression factor springout, 0 = disabled, 1...x as multipliers, example:maximum springrate == sprin...
float expansion_trigger_limit
bool nd_loaded_mass
User defined attr; mass is calculated from 'globals/loaded-mass' rather than 'globals/dry-mass'.
NodeNum_t ar_exhaust_dir_node
Old-format exhaust (one per vehicle) backwards direction node.
const PropAnimMode_t PROP_ANIM_MODE_OFFSET_Z
Central state/object manager and communications hub.
float long_bound
Maximum extension limit, in percentage ( 1.00 = 100% )
void ProcessBeam(RigDef::Beam &def)
int getLinkIDForName(Ogre::String &str)
std::pair< unsigned int, bool > AddNode(RigDef::Node::Id &id)
BitMask_t m_flaregroups_no_import
RoRnet::Lightmask.
unsigned int AddWheelRimBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
@ SHOCK_FLAG_TRG_CONTINUOUS
const PropAnimMode_t PROP_ANIM_MODE_BOUNCE
@ VCAM_ROLE_MIRROR
Flips the video output and when not in driver cam, acts like a natural mirror, not a screen.
void ProcessCollisionRange(RigDef::CollisionRange &def)
static const BitMask64_t SOURCE_SHIFT_LEFT_RIGHT
@ CURR_VEHICLE_HEAD_ONLY
Only current vehicle, main lights.
Physics: A vertex in the softbody structure.
float cmb_boundary_length
Attr; Maximum/minimum length proportional to orig. len.
std::vector< float > gear_ratios
std::shared_ptr< Inertia > inertia_defaults
float damp_in_fast
Damping value applied when shock is commpressing faster than split in velocity.
std::string GetCurrentElementMediaRG()
Where to load media from (the addonpart's bundle or vehicle's bundle?)
float global_minimass
'minimass' - used where 'set_default_minimass' is not applied.
void AdjustNodeBuoyancy(node_t &node, RigDef::Node &node_def, std::shared_ptr< RigDef::NodeDefaults > defaults)
For user-defined nodes.
std::vector< Ogre::Entity * > m_deletion_entities
For unloading vehicle; filled at spawn.
GameContext * GetGameContext()
const PropAnimFlag_t PROP_ANIM_FLAG_ACCEL
float max_inclination_angle
void ProcessNode(RigDef::Node &def)
BrakeCombo
Wheels are braked by three mechanisms: A footbrake, a handbrake/parkingbrake, and directional brakes ...
AeroAnimator aero_animator
Ogre::MaterialPtr m_managedmat_placeholder_template
An 'error marker' material (bright magenta) to generate managedmaterial placeholders from.
static const BitMask_t OPTION_s_CMD_NUM_SWITCH
float springout
shocks2 & shocks3
static const BitMask64_t SOURCE_HEADING
DifferentialTypeVec options
Order matters!
std::vector< Shock > shocks
@ VCAM_ROLE_MIRROR_PROP_RIGHT
The classic 'special prop/rear view mirror'.
static std::string getTweakedFlexbodyMedia(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
float progress_factor_spring_in
Progression factor for springin. A value of 0 disables this option. 1...x as multipliers,...
Designed to be run in physics loop (2khz)
@ AIRPLANE
its an airplane
float m_dry_mass
Physics attr;.
void CreateMirrorPropVideoCam(Ogre::MaterialPtr custom_mat, CustomMaterial::MirrorPropType type, Ogre::SceneNode *prop_scenenode)
void ProcessSlidenode(RigDef::SlideNode &def)
int shortbound_trigger_action
void AddBeam(int beam_id)
NodeNum_t vcam_node_lookat
Only for VCAM_ROLE_TRACK_CAM.
static const BitMask_t OPTION_y_INPUT_InvAILERON_RUDDER
std::vector< PropAnimKeyState > m_prop_anim_key_states
static const BitMask64_t SOURCE_PERMANENT
void ProcessRailGroup(RigDef::RailGroup &def)
static const BitMask_t OPTION_s_SUPPORT
@ LIGHTMASK_CUSTOM5
custom light 5 on
static std::string getTweakedManagedMatMediaRG(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
static float getTweakedWheelRimRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
Ogre::SceneNode * m_flares_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
bool cmb_is_1press
Attribute defined in truckfile.
bool ar_camera_node_roll_inv[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; indicates roll node is right instead of left.
const PropAnimFlag_t PROP_ANIM_FLAG_THROTTLE
GfxFlaresMode m_flares_mode
Snapshot of cvar 'gfx_flares_mode' on spawn.
int ar_nodes_name_top_length
For nicely formatted diagnostic output.
@ l_SKIP_LOADED
Only apply minimum mass to nodes without "L" option.
static const BitMask_t OPTION_b_KEY_BLOCKER
static const BitMask_t OPTION_AIRSPEED
Ogre::MaterialPtr mat_instance
An Ogre::Camera mounted on the actor and rendering into either in-scene texture or external window.
@ VCAM_ROLE_TRACKING_MIRROR
A MIRROR(1) with tracking node set.
static const BitMask_t OPTION_i_INVISIBLE
@ LIGHTMASK_BRAKES
brake lights on
static const BitMask64_t SOURCE_ALTIMETER_1K
Ogre::SceneNode * abx_scenenode
void SetBeamStrength(beam_t &beam, float strength)
uint16_t hb_beam_index
Index to Actor::ar_beams array.
virtual float getRadius()=0
std::vector< RailGroup * > m_railgroups
all the available RailGroups for this actor
Ogre::SceneNode * GetSceneNode()
static bool CheckSoundScriptLimit(ActorPtr const &vehicle, unsigned int count)
void ProcessDescription(Ogre::String const &line)
std::string m_cab_material_name
Original name defined in truckfile/globals.
void ProcessInterAxle(RigDef::InterAxle &def)
std::shared_ptr< BeamDefaults > defaults
char m_engine_type
't' = truck (default), 'c' = car ('engoption' attr #2)
int tr_ax_1
This axle is always driven.
void ProcessParticle(RigDef::Particle &def)
void ProcessCollisionBox(RigDef::CollisionBox &def)
Ogre::String face_material_name
CacheEntryPtr & getUsedActorEntry()
The actor entry itself.
float parking_brake_force
const PropAnimFlag_t PROP_ANIM_FLAG_PITCH
void ProcessTie(RigDef::Tie &def)
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)
float option_min_range_meters
const PropAnimFlag_t PROP_ANIM_FLAG_TURBO
void UpdateCollcabContacterNodes()
Ogre::SceneNode * vcam_prop_scenenode
Only for VCAM_ROLE_MIRROR_PROP_*.
Ogre::SceneNode * rod_scenenode
int ar_num_cinecams
Sim attr;.
static const BitMask_t OPTION_h_UNLOCKS_HOOK_GROUP
void SaveFlexbodiesToCache()
static const BitMask_t OPTION_D_CONTACT_BUOYANT
float ar_collision_range
Physics attr.
bool nx_may_get_wet
Attr; enables water drip and vapour.
static const BitMask_t OPTION_t_CONTINUOUS
void SetBeamDamping(beam_t &beam, float damping)
static const BitMask64_t SOURCE_GEAR_NEUTRAL
static const BitMask64_t SOURCE_ACCEL
std::vector< Texcoord > texcoords
@ SHOCK_FLAG_TRG_CMD_SWITCH
Ogre::SceneNode * m_curr_mirror_prop_scenenode
bool m_disable_smoke
Stops/starts smoke particles (i.e. exhausts, turbojets).
static const float WHEEL_FRICTION_COEF
std::vector< Cab > cab_triangles
float precompression
Changes compression or extension of the suspension when the truck spawns. This can be used to "level"...
static bool isFlareAnyhowRemoved(TuneupDefPtr &tuneup_def, FlareID_t flare_id)
NodeNum_t vcam_node_alt_pos
std::string uckp_description
std::shared_ptr< BeamDefaults > beam_defaults
const PropAnimFlag_t PROP_ANIM_FLAG_HEADING
bool CheckAxleLimit(unsigned int count)
std::string pp_media[2]
Redundant, for Tuning UI. Media1 = prop mesh name, Media2 = steeringwheel mesh/beaconprop flare mat.
float m_total_mass
Physics state; total mass in Kg.
void enableInducedDrag(float span, float area, bool l)
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.
static const BitMask_t OPTION_s_BUOYANT_NO_DRAG
static const int MAX_CAMERARAIL
maximum number of camera rail points
static Ogre::Vector3 getTweakedFlexbodyRotation(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
static const float DEFAULT_SPEEDO_MAX_KPH
@ TUNING_REMOVED_PLACEHOLDER
bool CreateNewCurve(Ogre::String const &name=customModel)
Creates new torque curve.
float ar_brake_force
Physics attr; filled at spawn.
#define SOUND_MODULATE(_ACTOR_, _MOD_, _VALUE_)
float global_min_mass_Kg
minimum node mass in Kg - only effective where DefaultMinimass was not set.
@ LIGHTMASK_CUSTOM8
custom light 8 on
bool ar_is_police
Gfx/sfx attr.
bool cc_can_brake
Cruise Control.
float alb_timer
Anti-lock brake state;.
static const float HOOK_LOCK_TIMER_DEFAULT
static const BitMask_t OPTION_s_DISABLE_ON_HIGH_SPEED
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
void ProcessSoundSource2(RigDef::SoundSource2 &def)
@ LIGHTMASK_CUSTOM2
custom light 2 on
static const BitMask_t OPTION_E_ENGINE_TRIGGER
static const BitMask_t OPTION_y_EXHAUST_DIRECTION
CacheSystem * GetCacheSystem()
void ProcessAntiLockBrakes(RigDef::AntiLockBrakes &def)
CameraMode_t fb_camera_mode_orig
Dynamic visibility mode {0 and higher = cinecam index}.
int m_num_proped_wheels
Physics attr, filled at spawn - Number of propelled wheels.
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'.
void ProcessWheel(RigDef::Wheel &def)
static const BitMask64_t SOURCE_TURBO
Node::Ref rotating_plate_nodes[4]
void ProcessCameraRail(RigDef::CameraRail &def)
int controlnumber
Only 'u' type flares, valid values 0-9, maps to EV_TRUCK_LIGHTTOGGLE01 to 10.
Ogre::String material_name
float animOpt3
MULTIPURPOSE.
std::vector< Node::Ref > node_list
static const BitMask_t OPTION_b_EXTRA_BUOYANCY
static void AddSoundSourceInstance(ActorPtr const &vehicle, Ogre::String const &sound_script_name, int node_index, int type=-2)
static const float ROTATOR_FORCE_DEFAULT
UI helper for displaying command control keys to user.
std::vector< PropAnim > pp_animations
std::vector< Shock3 > shocks3
CameraMode_t pp_camera_mode_active
Dynamic visibility mode {0 and higher = cinecam index}.
bool m_has_axles_section
Temporary (legacy parsing helper) until central diffs are implemented.
WheelPropulsion propulsion
int m_airplane_left_light
@ LOADDASHBOARD_SCREEN_HUD
Will be drawn to screen. Unless STACKABLE, it prevents the default dashboard from loading.
void RegisterCabMesh(Ogre::Entity *ent, Ogre::SceneNode *snode, FlexObj *flexobj)
void ProcessExhaust(RigDef::Exhaust &def)
static const BitMask_t OPTION_c_NO_GROUND_CONTACT
static const float BEAM_CREAK_DEFAULT
NodeNum_t rod_node2
Node index - may change during simulation!
Ogre::String particle_name
MirrorPropType mirror_prop_type
static Ogre::Vector3 getTweakedFlexbodyOffset(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
bool nd_rim_node
Attr; This node is part of a rim (only wheel types with separate rim nodes)
std::shared_ptr< BeamDefaults > beam_defaults
static const BitMask_t CONSTRAINT_ATTACH_NONE
static const BitMask_t OPTION_ALTIMETER_100K
static const BitMask_t OPTION_h_INPUT_InvELEVATOR_RUDDER
static std::string getTweakedPropMediaRG(TuneupDefPtr &tuneup_def, PropID_t prop_id, int media_idx, const std::string &orig_val)
CacheEntryPtr m_used_skin_entry
Graphics.
Abstract node ID (numbered or named) Node name is always available.
NodeNum_t vcam_node_dir_z
std::vector< FlexBodyWheel > flexbodywheels
static const BitMask_t OPTION_h_HOOK_POINT
void LoadResource(CacheEntryPtr &t)
Loads the associated resource bundle if not already done.
static const int MAX_SOUNDSCRIPTS_PER_TRUCK
maximum number of soundsscripts per actor
static const BitMask_t SOURCE_AERO_THROTTLE
ActorType ar_driveable
Sim attr; marks vehicle type and features.
virtual AeroEngineType getType()=0
node_t * GetNodePointer(RigDef::Node::Ref const &node_ref)
void ProcessProp(RigDef::Prop &def)
Resource group override is used with addonparts.
@ SHOCK_FLAG_TRG_CMD_BLOCKER
bool pp_aero_propeller_blade
Special - single blade mesh.
NodeNum_t ar_exhaust_pos_node
Old-format exhaust (one per vehicle) emitter node.
Differential * m_axle_diffs[1+MAX_WHEELS/2]
Physics.
static const BitMask64_t SOURCE_BRAKES
static bool isExhaustAnyhowRemoved(TuneupDefPtr &tuneup_def, ExhaustID_t exhaust_id)
bool alb_nodash
Anti-lock brake attribute: Hide the dashboard indicator?
PointColDetector * m_intra_point_col_detector
Physics.
float m_odometer_total
GUI state.
float alb_minspeed
Anti-lock brake attribute;.
@ LIGHTMASK_CUSTOM1
custom light 1 on
float contraction_trigger_limit
std::shared_ptr< NodeDefaults > node_defaults
std::vector< rope_t > ar_ropes
static std::string getTweakedWheelMediaRG(TuneupDefPtr &tuneup_def, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
const PropAnimFlag_t PROP_ANIM_FLAG_AEPITCH
float split_vel_in
Split velocity in (m/s) - threshold for slow / fast damping during compression.
const PropAnimFlag_t PROP_ANIM_FLAG_ELEVATORS
@ HYDRO_FLAG_REV_ELEVATOR
void ProcessPistonprop(RigDef::Pistonprop &def)
Ogre::String band_material_name
int FlareID_t
Index into Actor::ar_flares, use RoR::FLAREID_INVALID as empty value.
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)
void ProcessTurbojet(RigDef::Turbojet &def)
float dampin
shocks2 & shocks3
int rg_id
Spawn context - matching separately defined rails with slidenodes.
float alb_ratio
Anti-lock brake attribute: Regulating force.
static const BitMask_t OPTION_j_INVISIBLE
float ar_anim_shift_timer
For 'animator' with flag 'shifter'.
static WheelSide getTweakedWheelSide(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, WheelSide orig_val)
void CalculateBeamLength(beam_t &beam)
float short_bound
Maximum contraction limit, in percentage ( 1.00 = 100% )
Ogre::Vector3 m_spawn_position
const PropAnimFlag_t PROP_ANIM_FLAG_BRUDDER
InputEngine * GetInputEngine()
static float getTweakedWheelTireRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
int detacher_group
Attribute: detacher group number (integer)
void ProcessCruiseControl(RigDef::CruiseControl &def)
Submesh for old-style actor body (the "cab")
float progress_factor_damp_in
Progression factor for dampin. 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spr...
std::shared_ptr< Inertia > inertia_defaults
static const BitMask_t OPTION_M_ABSOLUTE_METRIC
ropable_t * ti_locked_ropable
std::shared_ptr< BeamDefaults > beam_defaults
@ SHOCK_FLAG_TRG_HOOK_UNLOCK
static const int LOCKGROUP_DEFAULT
unsigned int forum_account_id
std::vector< Ogre::AxisAlignedBox > ar_predicted_coll_bounding_boxes
RailGroup * CreateRail(std::vector< RigDef::Node::Range > &node_ranges)
static std::string getTweakedManagedMatMedia(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
static const BitMask_t CONSTRAINT_ATTACH_ALL
std::vector< commandbeam_t > beams
Texture coordinates for old-style actor body (the "cab")
bool nd_no_ground_contact
User-defined attr; node ignores contact with ground.
static const BitMask_t MODE_ROTATION_X
FlexMeshWheel * CreateFlexMeshWheel(unsigned int wheel_index, int axis_node_1_index, int axis_node_2_index, int nstart, int nrays, float rim_radius, bool rim_reverse, std::string const &rim_mesh_name, std::string const &rim_mesh_rg, std::string const &tire_material_name, std::string const &tire_material_rg)
std::vector< Hydro > hydros
static const int MAX_CABS
maximum number of cabs per actor
const PropAnimFlag_t PROP_ANIM_FLAG_SPEEDO
Ogre::SceneNode * m_wheels_parent_scenenode
this isn't used for moving/hiding things, just helps developers inspect the scene graph.
std::list< MotorSource > motor_sources
bool cmb_is_1press_center
Attribute defined in truckfile.
DashboardSpecial special_prop_dashboard
static const BitMask64_t SOURCE_DASHBOARD
Ogre::Vector3 vcam_pos_offset
RigDef::MaterialFlareBinding * material_flare_def
std::string wx_rim_mesh_name
Redundant, for Tuning UI. Only for 'meshwheels[2]' and 'flexbodywheels'.
static const BitMask64_t SOURCE_GEAR_REVERSE
float node_collision_range
ground_model_t * ar_submesh_ground_model
Node::Ref blade_tip_nodes[4]
bool m_apply_simple_materials
static const BitMask_t OPTION_r_ROPE
static const BitMask64_t SOURCE_CLUTCH
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
float hb_anim_param
Animators (beams updating length based on simulation variables)
static const BitMask_t MODE_OFFSET_Y
Ogre::String airfoil_name
float hb_speed
Rate of change.
static Ogre::Vector3 getTweakedNodePosition(TuneupDefPtr &tuneup_entry, NodeNum_t nodenum, Ogre::Vector3 orig_val)
static const BitMask64_t SOURCE_SIGNALSTALK
MeshObject * pp_mesh_obj
Optional; NULL if removed via tuneup/addonpart.
float sbd_spring
set beam default for spring
static const BitMask_t OPTION_F_10xTOUGHER_BUOYANT
int control_number
Only 'u' type flares.
float damp_in
Damping value applied when the shock is compressing.
std::vector< Node::Ref > nodes
static const BitMask_t OPTION_i_INVISIBLE
void ProcessRotator2(RigDef::Rotator2 &def)
void CreateMaterialFlare(int flare_index, Ogre::MaterialPtr mat)
bool _attachment_rate_set
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)
Manager for all visuals belonging to a single actor.
void CreateBeamVisuals(beam_t const &beam, int beam_index, bool visible, std::shared_ptr< RigDef::BeamDefaults > const &beam_defaults, std::string material_override="")
static void SetupDefaultSoundSources(ActorPtr const &actor)
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.
std::shared_ptr< BeamDefaults > beam_defaults
bool alb_notoggle
Anti-lock brake attribute: Disable in-game toggle?
CustomMaterial::MirrorPropType m_curr_mirror_prop_type
bool ti_no_self_lock
Attribute.
shock_t * ar_shocks
Shock absorbers.
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)
bool cmb_plays_sound
Attribute defined in truckfile.
@ CONSOLE_MSGTYPE_ACTOR
Parsing/spawn/simulation messages for actors.
std::vector< hydrobeam_t > ar_hydros
unsigned int _SectionWheels2AddBeam(RigDef::Wheel2 &wheel_2_def, node_t *node_1, node_t *node_2)
std::shared_ptr< Document > DocumentPtr
float pp_beacon_rot_rate[4]
Radians per second.
void ProcessCommand(RigDef::Command2 &def)
void setVisible(bool visibility)
static const BitMask_t OPTION_r_BUOYANT_ONLY_DRAG
RoR::CmdKeyInertiaConfig & GetInertiaConfig()
std::string particleSystemName
Name in .particle file ~ for display in Tuning UI.
TurbojetVisual tjet_visual
static const int MAX_WHEELS
maximum number of wheels per actor
std::vector< Node::Range > node_list
static const BitMask_t OPTION_m_METRIC
NOTE: Modcache processes this format directly using RoR::GenericDocument, see RoR::CacheSystem::FillA...
static const BitMask_t OPTION_PARKING
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
NodeNum_t GetNodeIndexOrThrow(RigDef::Node::Ref const &id)
ActorMemoryRequirements m_memory_requirements
float pp_wheel_rot_degree
std::shared_ptr< NodeDefaults > node_defaults
static const BitMask64_t SOURCE_SHIFT_BACK_FORTH
int di_idx_1
array location of wheel / axle 1
static const BitMask_t OPTION_SHORT_LIMIT
int FlexbodyID_t
Index to GfxActor::m_flexbodies, use RoR::FLEXBODYID_INVALID as empty value.
void SetDefaultRail(RailGroup *rail)
Sets rail to initially use when spawned or reset.
static const BitMask_t OPTION_H_LOCKS_HOOK_GROUP
std::string GetSubmeshGroundmodelName()
wheel_t ar_wheels[MAX_WHEELS]
static const BitMask_t OPTION_S_INVULNERABLE_BUOYANT
static const BitMask_t OPTION_i_INVISIBLE
bool alb_pulse_state
Anti-lock brake state;.
int m_airplane_right_light
float damping
The 'resistance to motion' of the shock. The best value is given by this equation: 2 * sqrt(suspended...
NodeNum_t ar_camera_node_pos[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; origin node.
beam_t & AddBeam(node_t &node_1, node_t &node_2, std::shared_ptr< RigDef::BeamDefaults > &defaults, int detacher_group)
Flexbody = A deformable mesh; updated on CPU every frame, then uploaded to video memory.
bool m_engine_has_air
Engine attribute.
void ProcessWheelDetacher(RigDef::WheelDetacher &def)
bool _max_attach_dist_set
std::shared_ptr< BeamDefaults > beam_defaults
void InitBeam(beam_t &beam, node_t *node_1, node_t *node_2)
Node::Ref base_plate_nodes[4]
@ NETWORKED_OK
not simulated (remote) actor
bool m_beam_break_debug_enabled
Logging state.
static const int MAX_SCREWPROPS
maximum number of boat screws per actor
float damp_out
Damping value applied when shock extending.
Ogre::BillboardSet * pp_beacon_bbs[4]
void AssignManagedMaterialTexture(Ogre::TextureUnitState *tus, const std::string &mm_name, int media_id, const std::string &tex_name)
Helper for ProcessManagedMaterial()
bool option_c_auto_center
Ogre::SceneNode * pp_scene_node
The pivot scene node (parented to root-node).
unsigned int spin_left_key
uint16_t cmb_beam_index
Index to Actor::ar_beams array.
bool cmb_is_autocentering
Attribute defined in truckfile.
const PropAnimFlag_t PROP_ANIM_FLAG_CLUTCH
float damp_in_slow
Damping value applied when shock is commpressing slower than split in velocity.
int16_t nd_lockgroup
Optional attribute (-1 = default, 9999 = deny lock) - used in the hook lock logic.
std::vector< ropable_t > ar_ropables
void SetTurboOptions(int type, float tinertiaFactor, int nturbos, float param1, float param2, float param3, float param4, float param5, float param6, float param7, float param8, float param9, float param10, float param11)
void ProcessFlexBodyWheel(RigDef::FlexBodyWheel &def)
int mode
0 and higher = cinecam index
Ogre::String material_name
static const BitMask_t OPTION_TACHO
beam_t * FindBeamInRig(NodeNum_t node_a, NodeNum_t node_b)
void ProcessTractionControl(RigDef::TractionControl &def)
float m_handbrake_force
Physics attr; defined in truckfile.
node_t * GetBeamNodePointer(RigDef::Node::Ref const &node_ref)
Ogre::MaterialPtr CreateSimpleMaterial(Ogre::ColourValue color)
static std::string getTweakedWheelMedia(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
Ogre::ColourValue emissive_color
static const BitMask64_t SOURCE_TORQUE
const PropAnimFlag_t PROP_ANIM_FLAG_ROLL
Ogre::String stop_function
static const BitMask_t OPTION_s_DISABLE_SELF_LOCK
static const BitMask64_t SOURCE_ALTIMETER_100K
void ProcessTrigger(RigDef::Trigger &def)
std::vector< Beam > beams
Ogre::ParticleSystem * smoker
This remains nullptr if removed via addonpart_unwanted_exhaust or Tuning UI.
std::vector< Airbrake * > ar_airbrakes
Ogre::String material_name
static const BitMask_t OPTION_r_INPUT_RUDDER
static const BitMask_t MODE_NO_FLIP
NodeNum_t ar_camera_rail[MAX_CAMERARAIL]
Nodes defining camera-movement spline.
TuneupDefPtr & getWorkingTuneupDef()
NodeNum_t ar_main_camera_node_roll
Sim attr; ar_camera_node_roll[0] >= 0 ? ar_camera_node_roll[0] : 0.
static VideoCamRole getTweakedVideoCameraRole(TuneupDefPtr &tuneup_def, VideoCameraID_t camera_id, VideoCamRole orig_val)
Node::Ref reference_arm_node
soundsource_t ar_soundsources[MAX_SOUNDSCRIPTS_PER_TRUCK]
std::shared_ptr< DefaultMinimass > default_minimass
int ar_num_shocks
Number of shock absorbers.
Ogre::String dash_link_name
bool ar_guisettings_use_engine_max_rpm
float m_load_mass
Physics attr; predefined load mass in Kg.
std::list< std::shared_ptr< RigDef::Document::Module > > m_selected_modules
std::unique_ptr< GfxActor > m_gfx_actor
bool m_beam_deform_debug_enabled
Logging state.
void setCastShadows(bool b)
@ LIGHTMASK_BLINK_RIGHT
right blinker on
void ProcessTransferCase(RigDef::TransferCase &def)
node_t * GetNodePointerOrThrow(RigDef::Node::Ref const &node_ref)
Ogre::Quaternion ar_main_camera_dir_corr
Sim attr;.
CVar * gfx_reduce_shadows
BeaconSpecial special_prop_beacon
const PropAnimFlag_t PROP_ANIM_FLAG_AILERONS
bool ar_has_active_shocks
Are there active stabilizer shocks?
Ogre::SceneNode * pp_beacon_scene_node[4]
float progress_factor_damp_out
Progression factor dampout, 0 = disabled, 1...x as multipliers, example:maximum dampingrate == spring...
ActorManager * GetActorManager()
void ProcessCinecam(RigDef::Cinecam &def)
float ar_guisettings_shifter_anim_time
Ogre::MaterialPtr material
int PropID_t
Index to GfxActor::m_props, use RoR::PROPID_INVALID as empty value.
static const BitMask_t OPTION_i_INVISIBLE
bool ar_minimass_skip_loaded_nodes
std::map< std::string, Ogre::MaterialPtr > ar_managed_materials
static const int MAX_AEROENGINES
maximum number of aero engines per actor
std::shared_ptr< BeamDefaults > beam_defaults
const PropAnimFlag_t PROP_ANIM_FLAG_BTHROTTLE
Ogre::String face_material_name
static const BitMask_t OPTION_b_BUOYANT
const PropAnimFlag_t PROP_ANIM_FLAG_EVENT
void InitNode(node_t &node, Ogre::Vector3 const &position)
@ VCAM_ROLE_MIRROR_PROP_LEFT
The classic 'special prop/rear view mirror'.
static const BitMask_t OPTION_x_INPUT_AILERON_RUDDER
@ LIGHTMASK_CUSTOM6
custom light 6 on
std::vector< MeshWheel > meshwheels
Ogre::String sound_script_name
NodeNum_t ar_cinecam_node[MAX_CAMERAS]
Sim attr; Cine-camera node indexes.
static const int MAX_TEXCOORDS
maximum number of texture coordinates per actor
void ProcessManagedMaterial(RigDef::ManagedMaterial &def)
std::unique_ptr< Buoyance > m_buoyance
Physics.
const PropAnimMode_t PROP_ANIM_MODE_OFFSET_Y
const PropAnimFlag_t PROP_ANIM_FLAG_TACHO
float damp_out_slow
Damping value applied when shock is commpressing slower than split out velocity.
Ogre::String flare_material_name
void SetupVisuals(RigDef::Turbojet &def, int num, std::string const &propname, Ogre::Entity *nozzle, Ogre::Entity *afterburner_flame)
void ProcessWheel2(RigDef::Wheel2 &def)
std::vector< Node::Ref > fixes
SimpleInertia inertia
Only 'flares3'.
float ar_guisettings_speedo_max_kph
std::list< Animation > animations
std::vector< CabSubmesh > m_oldstyle_cab_submeshes
const TerrainPtr & GetTerrain()
Ogre::String fname
filename
static const BitMask_t OPTION_f_NO_SPARKS
static const BitMask_t OPTION_VERTICAL_VELOCITY
static const BitMask_t OPTION_GEAR_SELECT
static const BitMask64_t SOURCE_SEQUENTIAL_SHIFT
FlexBody * CreateFlexBody(FlexbodyID_t flexbody_id, const NodeNum_t ref_node, const NodeNum_t x_node, const NodeNum_t y_node, Ogre::Vector3 offset, Ogre::Vector3 rotation, std::vector< unsigned int > &node_indices, const std::string &mesh_name, const std::string &resource_group_name)
int SetCmdKeyDelay(RoR::CmdKeyInertiaConfig &cfg, float start_delay, float stop_delay, std::string start_function, std::string stop_function)
int pp_aero_engine_idx
Special - a turboprop/pistonprop reference.
static const BitMask64_t SOURCE_SPEEDO
bool CheckScrewpropLimit(unsigned int count)