RigsofRods
Soft-body Physics Simulation
Data Structures | Namespaces | Typedefs | Enumerations | Functions
RigDef_File.h File Reference

Data structures representing 'truck' file format, see https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/ for reference. More...

#include "Application.h"
#include "BitFlags.h"
#include "GfxData.h"
#include "RigDef_Node.h"
#include "SimConstants.h"
#include "SimData.h"
#include <list>
#include <memory>
#include <vector>
#include <string>
#include <OgreString.h>
#include <OgreVector3.h>
#include <OgreStringConverter.h>
+ Include dependency graph for RigDef_File.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RigDef::AeroAnimator
 
struct  RigDef::Assetpack
 
struct  RigDef::BaseWheel
 
struct  RigDef::BaseMeshWheel
 
struct  RigDef::BaseWheel2
 
struct  RigDef::Inertia
 
struct  RigDef::Airbrake
 
struct  RigDef::Animation
 
struct  RigDef::Animation::MotorSource
 
struct  RigDef::Animator
 
struct  RigDef::AntiLockBrakes
 
struct  RigDef::Author
 
struct  RigDef::Axle
 
struct  RigDef::Beam
 
struct  RigDef::BeamDefaultsScale
 
struct  RigDef::BeamDefaults
 
struct  RigDef::Brakes
 
struct  RigDef::Cab
 
struct  RigDef::Camera
 
struct  RigDef::CameraRail
 
struct  RigDef::CameraSettings
 
struct  RigDef::Cinecam
 
struct  RigDef::CollisionBox
 
struct  RigDef::CollisionRange
 
struct  RigDef::Command2
 
struct  RigDef::CruiseControl
 
struct  RigDef::DefaultMinimass
 
struct  RigDef::DefaultSkin
 
struct  RigDef::Engine
 
struct  RigDef::Engoption
 
struct  RigDef::Engturbo
 
struct  RigDef::Exhaust
 
struct  RigDef::ExtCamera
 
struct  RigDef::FileFormatVersion
 
struct  RigDef::Fileinfo
 
struct  RigDef::Flare2
 
struct  RigDef::Flare3
 
struct  RigDef::Flexbody
 
struct  RigDef::FlexBodyWheel
 
struct  RigDef::Fusedrag
 
struct  RigDef::Globals
 
struct  RigDef::Guid
 
struct  RigDef::GuiSettings
 
struct  RigDef::Help
 
struct  RigDef::Hook
 
struct  RigDef::Hydro
 
struct  RigDef::InterAxle
 
struct  RigDef::Lockgroup
 
struct  RigDef::ManagedMaterialsOptions
 
struct  RigDef::ManagedMaterial
 
struct  RigDef::MaterialFlareBinding
 
struct  RigDef::Minimass
 
struct  RigDef::MeshWheel
 
struct  RigDef::MeshWheel2
 
struct  RigDef::NodeDefaults
 
struct  RigDef::Particle
 
struct  RigDef::Pistonprop
 
struct  RigDef::Prop
 
struct  RigDef::Prop::DashboardSpecial
 
struct  RigDef::Prop::BeaconSpecial
 
struct  RigDef::RailGroup
 
struct  RigDef::Ropable
 
struct  RigDef::Rope
 
struct  RigDef::Rotator
 
struct  RigDef::Rotator2
 
struct  RigDef::Screwprop
 
struct  RigDef::Script
 
struct  RigDef::ShadowOptions
 
struct  RigDef::Shock
 
struct  RigDef::Shock2
 
struct  RigDef::Shock3
 
struct  RigDef::SkeletonSettings
 
struct  RigDef::SlideNode
 
struct  RigDef::SoundSource
 
struct  RigDef::SoundSource2
 
struct  RigDef::SpeedLimiter
 
struct  RigDef::Submesh
 
struct  RigDef::Texcoord
 
struct  RigDef::Tie
 
struct  RigDef::TorqueCurve
 
struct  RigDef::TorqueCurve::Sample
 
struct  RigDef::TractionControl
 
struct  RigDef::TransferCase
 
struct  RigDef::Trigger
 
struct  RigDef::Turbojet
 
struct  RigDef::Turboprop2
 
struct  RigDef::VideoCamera
 
struct  RigDef::Wheel
 
struct  RigDef::Wheel2
 
struct  RigDef::WheelDetacher
 
struct  RigDef::Wing
 
struct  RigDef::Document
 
struct  RigDef::Document::Module
 

Namespaces

 RigDef
 

Typedefs

typedef std::vector< DifferentialType > RigDef::DifferentialTypeVec
 

Enumerations

enum  RigDef::Keyword {
  RigDef::Keyword::INVALID = 0, RigDef::Keyword::ADD_ANIMATION = 1, RigDef::Keyword::AIRBRAKES, RigDef::Keyword::ANIMATORS,
  RigDef::Keyword::ANTILOCKBRAKES, RigDef::Keyword::ASSETPACKS, RigDef::Keyword::AUTHOR, RigDef::Keyword::AXLES,
  RigDef::Keyword::BACKMESH, RigDef::Keyword::BEAMS, RigDef::Keyword::BRAKES, RigDef::Keyword::CAB,
  RigDef::Keyword::CAMERARAIL, RigDef::Keyword::CAMERAS, RigDef::Keyword::CINECAM, RigDef::Keyword::COLLISIONBOXES,
  RigDef::Keyword::COMMANDS, RigDef::Keyword::COMMANDS2, RigDef::Keyword::COMMENT, RigDef::Keyword::CONTACTERS,
  RigDef::Keyword::CRUISECONTROL, RigDef::Keyword::DEFAULT_SKIN, RigDef::Keyword::DESCRIPTION, RigDef::Keyword::DETACHER_GROUP,
  RigDef::Keyword::DISABLEDEFAULTSOUNDS, RigDef::Keyword::ENABLE_ADVANCED_DEFORMATION, RigDef::Keyword::END, RigDef::Keyword::END_COMMENT,
  RigDef::Keyword::END_DESCRIPTION, RigDef::Keyword::END_SECTION, RigDef::Keyword::ENGINE, RigDef::Keyword::ENGOPTION,
  RigDef::Keyword::ENGTURBO, RigDef::Keyword::ENVMAP, RigDef::Keyword::EXHAUSTS, RigDef::Keyword::EXTCAMERA,
  RigDef::Keyword::FILEFORMATVERSION, RigDef::Keyword::FILEINFO, RigDef::Keyword::FIXES, RigDef::Keyword::FLARES,
  RigDef::Keyword::FLARES2, RigDef::Keyword::FLARES3, RigDef::Keyword::FLEXBODIES, RigDef::Keyword::FLEXBODY_CAMERA_MODE,
  RigDef::Keyword::FLEXBODYWHEELS, RigDef::Keyword::FORSET, RigDef::Keyword::FORWARDCOMMANDS, RigDef::Keyword::FUSEDRAG,
  RigDef::Keyword::GLOBALS, RigDef::Keyword::GUID, RigDef::Keyword::GUISETTINGS, RigDef::Keyword::HELP,
  RigDef::Keyword::HIDEINCHOOSER, RigDef::Keyword::HOOKGROUP, RigDef::Keyword::HOOKS, RigDef::Keyword::HYDROS,
  RigDef::Keyword::IMPORTCOMMANDS, RigDef::Keyword::INTERAXLES, RigDef::Keyword::LOCKGROUPS, RigDef::Keyword::LOCKGROUP_DEFAULT_NOLOCK,
  RigDef::Keyword::MANAGEDMATERIALS, RigDef::Keyword::MATERIALFLAREBINDINGS, RigDef::Keyword::MESHWHEELS, RigDef::Keyword::MESHWHEELS2,
  RigDef::Keyword::MINIMASS, RigDef::Keyword::NODECOLLISION, RigDef::Keyword::NODES, RigDef::Keyword::NODES2,
  RigDef::Keyword::PARTICLES, RigDef::Keyword::PISTONPROPS, RigDef::Keyword::PROP_CAMERA_MODE, RigDef::Keyword::PROPS,
  RigDef::Keyword::RAILGROUPS, RigDef::Keyword::RESCUER, RigDef::Keyword::RIGIDIFIERS, RigDef::Keyword::ROLLON,
  RigDef::Keyword::ROPABLES, RigDef::Keyword::ROPES, RigDef::Keyword::ROTATORS, RigDef::Keyword::ROTATORS2,
  RigDef::Keyword::SCREWPROPS, RigDef::Keyword::SCRIPTS, RigDef::Keyword::SECTION, RigDef::Keyword::SECTIONCONFIG,
  RigDef::Keyword::SET_BEAM_DEFAULTS, RigDef::Keyword::SET_BEAM_DEFAULTS_SCALE, RigDef::Keyword::SET_COLLISION_RANGE, RigDef::Keyword::SET_DEFAULT_MINIMASS,
  RigDef::Keyword::SET_INERTIA_DEFAULTS, RigDef::Keyword::SET_MANAGEDMATERIALS_OPTIONS, RigDef::Keyword::SET_NODE_DEFAULTS, RigDef::Keyword::SET_SHADOWS,
  RigDef::Keyword::SET_SKELETON_SETTINGS, RigDef::Keyword::SHOCKS, RigDef::Keyword::SHOCKS2, RigDef::Keyword::SHOCKS3,
  RigDef::Keyword::SLIDENODE_CONNECT_INSTANTLY, RigDef::Keyword::SLIDENODES, RigDef::Keyword::SLOPE_BRAKE, RigDef::Keyword::SOUNDSOURCES,
  RigDef::Keyword::SOUNDSOURCES2, RigDef::Keyword::SPEEDLIMITER, RigDef::Keyword::SUBMESH, RigDef::Keyword::SUBMESH_GROUNDMODEL,
  RigDef::Keyword::TEXCOORDS, RigDef::Keyword::TIES, RigDef::Keyword::TORQUECURVE, RigDef::Keyword::TRACTIONCONTROL,
  RigDef::Keyword::TRANSFERCASE, RigDef::Keyword::TRIGGERS, RigDef::Keyword::TURBOJETS, RigDef::Keyword::TURBOPROPS,
  RigDef::Keyword::TURBOPROPS2, RigDef::Keyword::VIDEOCAMERA, RigDef::Keyword::WHEELDETACHERS, RigDef::Keyword::WHEELS,
  RigDef::Keyword::WHEELS2, RigDef::Keyword::WINGS
}
 
enum  RigDef::SpecialProp {
  RigDef::SpecialProp::NONE, RigDef::SpecialProp::MIRROR_LEFT, RigDef::SpecialProp::MIRROR_RIGHT, RigDef::SpecialProp::DASHBOARD_LEFT,
  RigDef::SpecialProp::DASHBOARD_RIGHT, RigDef::SpecialProp::AERO_PROP_SPIN, RigDef::SpecialProp::AERO_PROP_BLADE, RigDef::SpecialProp::DRIVER_SEAT,
  RigDef::SpecialProp::DRIVER_SEAT_2, RigDef::SpecialProp::BEACON, RigDef::SpecialProp::REDBEACON, RigDef::SpecialProp::LIGHTBAR
}
 
enum  RigDef::ManagedMaterialType {
  RigDef::ManagedMaterialType::INVALID, RigDef::ManagedMaterialType::FLEXMESH_STANDARD, RigDef::ManagedMaterialType::FLEXMESH_TRANSPARENT, RigDef::ManagedMaterialType::MESH_STANDARD,
  RigDef::ManagedMaterialType::MESH_TRANSPARENT
}
 
enum  RigDef::EngineType { RigDef::EngineType::c_CAR = 'c', RigDef::EngineType::e_ECAR = 'e', RigDef::EngineType::t_TRUCK = 't' }
 
enum  RigDef::DifferentialType : char { RigDef::DifferentialType::o_OPEN = 'o', RigDef::DifferentialType::l_LOCKED = 'l', RigDef::DifferentialType::s_SPLIT = 's', RigDef::DifferentialType::v_VISCOUS = 'v' }
 
enum  RigDef::MinimassOption : char { RigDef::MinimassOption::n_DUMMY = 'n', RigDef::MinimassOption::l_SKIP_LOADED = 'l' }
 
enum  RigDef::WheelBraking : int {
  RigDef::WheelBraking::NONE = 0, RigDef::WheelBraking::FOOT_HAND = 1, RigDef::WheelBraking::FOOT_HAND_SKID_LEFT = 2, RigDef::WheelBraking::FOOT_HAND_SKID_RIGHT = 3,
  RigDef::WheelBraking::FOOT_ONLY = 4
}
 
enum  RigDef::WheelPropulsion : int { RigDef::WheelPropulsion::NONE = 0, RigDef::WheelPropulsion::FORWARD = 1, RigDef::WheelPropulsion::BACKWARD = 2 }
 
enum  RigDef::WingControlSurface : char {
  RigDef::WingControlSurface::n_NONE = 'n', RigDef::WingControlSurface::a_RIGHT_AILERON = 'a', RigDef::WingControlSurface::b_LEFT_AILERON = 'b', RigDef::WingControlSurface::f_FLAP = 'f',
  RigDef::WingControlSurface::e_ELEVATOR = 'e', RigDef::WingControlSurface::r_RUDDER = 'r', RigDef::WingControlSurface::S_RIGHT_HAND_STABILATOR = 'S', RigDef::WingControlSurface::T_LEFT_HAND_STABILATOR = 'T',
  RigDef::WingControlSurface::c_RIGHT_ELEVON = 'c', RigDef::WingControlSurface::d_LEFT_ELEVON = 'd', RigDef::WingControlSurface::g_RIGHT_FLAPERON = 'g', RigDef::WingControlSurface::h_LEFT_FLAPERON = 'h',
  RigDef::WingControlSurface::U_RIGHT_HAND_TAILERON = 'U', RigDef::WingControlSurface::V_LEFT_HAND_TAILERON = 'V', RigDef::WingControlSurface::i_RIGHT_RUDDERVATOR = 'i', RigDef::WingControlSurface::j_LEFT_RUDDERVATOR = 'j'
}
 
enum  RigDef::TieOption : char { RigDef::TieOption::n_DUMMY = 'n', RigDef::TieOption::v_DUMMY = 'v', RigDef::TieOption::i_INVISIBLE = 'i', RigDef::TieOption::s_NO_SELF_LOCK = 's' }
 
enum  RigDef::CabOption : char {
  RigDef::CabOption::c_CONTACT = 'c', RigDef::CabOption::b_BUOYANT = 'b', RigDef::CabOption::p_10xTOUGHER = 'p', RigDef::CabOption::u_INVULNERABLE = 'u',
  RigDef::CabOption::s_BUOYANT_NO_DRAG = 's', RigDef::CabOption::r_BUOYANT_ONLY_DRAG = 'r', RigDef::CabOption::D_CONTACT_BUOYANT = 'D', RigDef::CabOption::F_10xTOUGHER_BUOYANT = 'F',
  RigDef::CabOption::S_INVULNERABLE_BUOYANT = 'S'
}
 
enum  RigDef::TriggerOption : char {
  RigDef::TriggerOption::i_INVISIBLE = 'i', RigDef::TriggerOption::c_COMMAND_STYLE = 'c', RigDef::TriggerOption::x_START_DISABLED = 'x', RigDef::TriggerOption::b_KEY_BLOCKER = 'b',
  RigDef::TriggerOption::B_TRIGGER_BLOCKER = 'B', RigDef::TriggerOption::A_INV_TRIGGER_BLOCKER = 'A', RigDef::TriggerOption::s_CMD_NUM_SWITCH = 's', RigDef::TriggerOption::h_UNLOCKS_HOOK_GROUP = 'h',
  RigDef::TriggerOption::H_LOCKS_HOOK_GROUP = 'H', RigDef::TriggerOption::t_CONTINUOUS = 't', RigDef::TriggerOption::E_ENGINE_TRIGGER = 'E'
}
 
enum  RigDef::BeamOption : char { RigDef::BeamOption::v_DUMMY = 'v', RigDef::BeamOption::i_INVISIBLE = 'i', RigDef::BeamOption::r_ROPE = 'r', RigDef::BeamOption::s_SUPPORT = 's' }
 
enum  RigDef::HydroOption : char {
  RigDef::HydroOption::n_INPUT_NORMAL = 'n', RigDef::HydroOption::j_INVISIBLE = 'j', RigDef::HydroOption::i_INVISIBLE_INPUT_NORMAL = 'i', RigDef::HydroOption::s_DISABLE_ON_HIGH_SPEED = 's',
  RigDef::HydroOption::a_INPUT_AILERON = 'a', RigDef::HydroOption::r_INPUT_RUDDER = 'r', RigDef::HydroOption::e_INPUT_ELEVATOR = 'e', RigDef::HydroOption::u_INPUT_AILERON_ELEVATOR = 'u',
  RigDef::HydroOption::v_INPUT_InvAILERON_ELEVATOR = 'v', RigDef::HydroOption::x_INPUT_AILERON_RUDDER = 'x', RigDef::HydroOption::y_INPUT_InvAILERON_RUDDER = 'y', RigDef::HydroOption::g_INPUT_ELEVATOR_RUDDER = 'g',
  RigDef::HydroOption::h_INPUT_InvELEVATOR_RUDDER = 'h'
}
 
enum  RigDef::ShockOption : char {
  RigDef::ShockOption::n_DUMMY = 'n', RigDef::ShockOption::v_DUMMY = 'v', RigDef::ShockOption::i_INVISIBLE = 'i', RigDef::ShockOption::L_ACTIVE_LEFT = 'L',
  RigDef::ShockOption::R_ACTIVE_RIGHT = 'R', RigDef::ShockOption::m_METRIC = 'm'
}
 
enum  RigDef::Shock2Option : char {
  RigDef::Shock2Option::n_DUMMY = 'n', RigDef::Shock2Option::v_DUMMY = 'v', RigDef::Shock2Option::i_INVISIBLE = 'i', RigDef::Shock2Option::s_SOFT_BUMP_BOUNDS = 's',
  RigDef::Shock2Option::m_METRIC = 'm', RigDef::Shock2Option::M_ABSOLUTE_METRIC = 'M'
}
 
enum  RigDef::Shock3Option : char {
  RigDef::Shock3Option::n_DUMMY = 'n', RigDef::Shock3Option::v_DUMMY = 'v', RigDef::Shock3Option::i_INVISIBLE = 'i', RigDef::Shock3Option::m_METRIC = 'm',
  RigDef::Shock3Option::M_ABSOLUTE_METRIC = 'M'
}
 
enum  RigDef::NodeOption : char {
  RigDef::NodeOption::n_DUMMY = 'n', RigDef::NodeOption::m_NO_MOUSE_GRAB = 'm', RigDef::NodeOption::f_NO_SPARKS = 'f', RigDef::NodeOption::x_EXHAUST_POINT = 'x',
  RigDef::NodeOption::y_EXHAUST_DIRECTION = 'y', RigDef::NodeOption::c_NO_GROUND_CONTACT = 'c', RigDef::NodeOption::h_HOOK_POINT = 'h', RigDef::NodeOption::e_TERRAIN_EDIT_POINT = 'e',
  RigDef::NodeOption::b_EXTRA_BUOYANCY = 'b', RigDef::NodeOption::p_NO_PARTICLES = 'p', RigDef::NodeOption::L_LOG = 'L', RigDef::NodeOption::l_LOAD_WEIGHT = 'l'
}
 

Functions

const char * RigDef::KeywordToString (Keyword keyword)
 

Detailed Description

Data structures representing 'truck' file format, see https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/ for reference.

Author
Petr Ohlidal
Date
12/2013 CODING GUIDELINES: each element (line) should have dedicated struct for data. Auto-importing to higher version (i.e. 'flares' -> 'flares2') is OK. all data should be stored in std::vector<>s. the data vectors should be named exactly as their file format keywords. each option-string should have dedicated enum class with fields named '{letter}_{MEANING}'. all bitmasks should use BitMask_t data type. all bitmask constants should have format static const BitMask_t MEANING = BITMASK({number}). all option strings should have parsing function GetArgWhatever(int index). option-strings should be stored as bitmasks (unless order matters). If only single option is acceptable, use the enum directly. all data structs should contain only arguments, in order. Helper data (where needed) must be prefixed with _.

Definition in file RigDef_File.h.