|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
59 ,
unsigned int vector_index
94 void reset(
bool keep_position =
false);
101 void resetPosition(Ogre::Vector3 translation,
bool setInitPosition);
102 void resetPosition(
float px,
float pz,
bool setInitPosition,
float miny);
507 void CalcShocks(
bool doUpdate,
int num_steps);
508 void CalcShocks2(
int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v);
509 void CalcShocks3(
int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v);
510 void CalcTriggers(
int i, Ogre::Real difftoBeamL,
bool update_hooks);
513 void CalcWheels(
bool doUpdate,
int num_steps);
void CalcTruckEngine(bool doUpdate)
bool m_blinker_right_lit
Blinking state of right turn signal.
void setHighBeamsVisible(bool val)
int getAxleDiffMode()
Writes info to console/notify box.
float ar_anim_previous_crank
For 'animator' with flag 'torque'.
Ogre::Vector3 m_translation_request
Accumulator.
float ar_avg_wheel_speed
Physics state; avg wheel speed in m/s.
void searchBeamDefaults()
Searches for more stable beam defaults.
std::string * ar_nodes_name
Name in truck file, only if defined with 'nodes2'.
void resetPosition(Ogre::Vector3 translation, bool setInitPosition)
Moves the actor to given world coords.
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...
bool cc_mode
Cruise Control.
int ar_num_contactable_nodes
Total number of nodes which can contact ground or cabs.
float m_odometer_user
GUI state.
int getWheelDiffMode()
Writes info to console/notify box.
void pushNetwork(char *data, int size)
Process incoming data; fills actor's data buffers and flips them. Called by the network thread....
float getMinCameraRadius()
Softbody object; can be anything from soda can to a space shuttle Constructed from a truck definition...
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
void CalcCommands(bool doUpdate)
std::vector< SlideNode > m_slidenodes
all the SlideNodes available on this actor
float getWheelSpeed() const
std::vector< float > ar_nb_optimum
Temporary storage of the optimum search result.
ground_model_t * ar_last_fuzzy_ground_model
GUI state.
NodeNum_t ar_camera_node_dir[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; back node.
bool isNodeWheelRim(int nodeNumber)
Is node marked as wheel rim? Note some wheel models use only tire nodes. See https://docs....
bool getBeaconMode() const
void BITMASK_SET(BitMask_t &mask, BitMask_t flag, bool val)
Ogre::String m_section_config
std::pair< RailGroup *, Ogre::Real > GetClosestRailOnActor(ActorPtr actor, const SlideNode &node)
int getShockNode2(int shock_number)
int ar_buoycabs[MAX_CABS]
void setLightStateMask(BitMask_t lightmask)
Does all the necessary toggling.
bool ar_physics_paused
Sim state.
void ensureWorkingTuneupDef()
Creates a working tuneup def if it doesn't exist yet.
node_t * m_fusealge_back
Physics attr; defined in truckfile.
bool isLocked()
Are hooks locked?
collcab_rate_t ar_inter_collcabrate[MAX_CABS]
NodeNum_t ar_extern_camera_node
float GetFFbHydroForces() const
ExtCameraMode ar_extern_camera_mode
std::string ar_filename
Attribute; filled at spawn.
std::vector< float > ar_nb_reference
Temporary storage of the reference search result.
bool m_water_contact
Scripting state.
void toggleAxleDiffMode()
Ogre::Real ar_hydro_dir_wheel_display
float alb_pulse_time
Anti-lock brake attribute;.
void setHeadlightsVisible(bool val)
cparticle_t ar_custom_particles[MAX_CPARTICLES]
int m_num_wheel_diffs
Physics attr.
bool getSmokeEnabled() const
unsigned int ar_vector_index
Sim attr; actor element index in std::vector<m_actors>
void CalcForceFeedback(bool doUpdate)
bool m_trigger_debug_enabled
Logging state.
bool ar_disable_aerodyn_turbulent_drag
Physics state.
bool ar_collision_relevant
Physics state;.
ActorPtrVec ar_linked_actors
BEWARE: Includes indirect links, see DetermineLinkedActors(); Other actors linked using 'hooks/ties/r...
Ogre::Vector3 GetCameraDir()
void autoBlinkReset()
Resets the turn signal when the steering wheel is turned back.
bool getCustomParticleMode()
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
int m_net_first_wheel_node
Network attr; Determines data buffer layout; calculated on spawn.
float cc_target_rpm
Cruise Control.
bool ar_engine_hydraulics_ready
Sim state; does engine have enough RPM to power hydraulics?
bool isNodeWheelTire(int nodeNumber)
Is node marked as wheel tire? Note some wheel models use only tire nodes. See https://docs....
Ogre::AxisAlignedBox ar_bounding_box
standard bounding box (surrounds all nodes of an actor)
float tc_ratio
Traction control attribute: Regulating force.
std::vector< Ogre::SceneNode * > m_deletion_scene_nodes
For unloading vehicle; filled at spawn.
std::vector< exhaust_t > exhausts
int m_num_axle_diffs
Physics attr.
float getHeightAboveGround(bool skip_virtual_nodes=true)
Differential * m_wheel_diffs[MAX_WHEELS/2]
Physics.
float m_fusealge_width
Physics attr; defined in truckfile.
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).
bool getFogLightsVisible() const
void toggleWheelDiffMode()
void mouseMove(NodeNum_t node, Ogre::Vector3 pos, float force)
Ogre::Vector3 ar_fusedrag
Physics state.
int getWheelNodeCount() const
std::pair< float, float > ar_nb_shocks_k_interval
Search interval for springiness & damping of shock beams.
int ar_buoycab_types[MAX_CABS]
int m_proped_wheel_pairs[MAX_WHEELS]
Physics attr; For inter-differential locking.
@ LIGHTMASK_REVERSE
reverse light on
Ogre::Real m_min_camera_radius
RigDef::DocumentPtr m_definition
void CalcAnimators(hydrobeam_t const &hydrobeam, float &cstate, int &div)
Ogre::Real ar_brake
Physics state; braking intensity.
bool sl_enabled
Speed limiter;.
float getShockSpringRate(int shock_number)
Wheel 'pressure adjustment' logic (only for 'wheels2')
float tc_pulse_time
Traction control attribute;.
int m_masscount
Physics attr; Number of nodes loaded with l option.
void RequestUpdateHudFeatures()
std::vector< std::string > getDescription()
void ResetAngle(float rot)
void toggleCustomParticles()
bool ar_toggle_ropes
Sim state.
void calculateLocalGForces()
Derive the truck local g-forces from the global ones.
void HandleAngelScriptEvents(float dt)
bool m_blinker_autoreset
When true, we're steering and blinker will turn off automatically.
std::vector< collision_box_t * > CollisionBoxPtrVec
std::vector< hook_t > ar_hooks
std::pair< float, float > ar_nb_shocks_scale
Scales for springiness & damping of shock beams.
int ar_current_cinecam
Sim state; index of current CineCam (-1 if using 3rd-person camera)
float getShockDamping(int shock_number)
float m_net_node_compression
For incoming/outgoing traffic; calculated on spawn.
A land vehicle engine + transmission.
bool m_hud_features_ok
Gfx state; Are HUD features matching actor's capabilities?
bool ar_trailer_parking_brake
std::vector< wheeldetacher_t > ar_wheeldetachers
void UpdatePhysicsOrigin()
std::vector< tie_t > ar_ties
void CalcTriggers(int i, Ogre::Real difftoBeamL, bool update_hooks)
float sl_speed_limit
Speed limiter;.
float cc_target_speed_lower_limit
Cruise Control.
ActorState getTruckState()
float m_stabilizer_shock_ratio
Physics state.
std::map< int, int > ar_net_stream_results
Ogre::Vector3 m_avg_node_position_prev
void CalcForcesEulerCompute(bool doUpdate, int num_steps)
std::string getTruckFileResourceGroup()
NodeNum_t ar_main_camera_node_dir
Sim attr; ar_camera_node_dir[0] >= 0 ? ar_camera_node_dir[0] : 0.
bool ar_hide_in_actor_list
Hide in list of spawned actors (available in top menubar). Useful for fixed-place machinery,...
std::vector< std::vector< int > > ar_node_to_beam_connections
Ogre::AxisAlignedBox ar_predicted_bounding_box
int ar_aerial_flap
Sim state; state of aircraft flaps (values: 0-5)
void CalcShocks2(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
float m_stabilizer_shock_sleep
Sim state.
@ LOCAL_SIMULATED
simulated (local) actor
float ar_hydro_rudder_state
bool getReverseLightVisible() const
@ NOT_DRIVEABLE
not drivable at all
std::vector< float > wheel_data
Wheel rotations.
int ar_nb_measure_steps
Amount of physics steps to be measured.
void displayAxleDiffMode()
Cycles through the available inter axle diff modes.
Ogre::MaterialPtr getManagedMaterialInstance(const std::string &orig_name)
std::deque< NetUpdate > m_net_updates
Incoming stream of NetUpdates.
DashBoardManager * ar_dashboard
void tractioncontrolToggle()
Skidmark * m_skid_trails[MAX_WHEELS *2]
std::pair< float, float > ar_nb_wheels_scale
Scales for springiness & damping of wheel / rim beams.
PerVehicleCameraContext m_camera_context
bool ar_forward_commands
Sim state.
void DetermineLinkedActors()
bool m_ongoing_reset
Hack to prevent position/rotation creep during interactive truck reset.
float m_avg_proped_wheel_radius
Physics attr, filled at spawn - Average proped wheel radius.
float ar_left_mirror_angle
Sim state; rear view mirror angle.
Ogre::Vector3 m_rotation_request_center
void updateFlareStates(float dt)
void setBlinkType(BlinkType blink)
Land vehicle feat Simulates tyre pressurization by adjusting springness of in-wheel beams.
bool tc_nodash
Traction control attribute; Hide the dashboard indicator?
float ar_right_mirror_angle
Sim state; rear view mirror angle.
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
size_t m_net_wheel_buf_size
For incoming/outgoing traffic; calculated on spawn.
float ar_wheel_speed
Physics state; wheel speed in m/s.
void requestAngleSnap(int division)
int ar_num_contacters
Total number of nodes which can selfcontact cabs.
Airfoil * m_fusealge_airfoil
Physics attr; defined in truckfile.
std::vector< std::shared_ptr< Task > > m_flexbody_tasks
Gfx state.
bool tc_pulse_state
Traction control state;.
bool m_has_command_beams
Physics attr;.
Ogre::Vector3 m_camera_local_gforces_max
Physics state (camera local)
float ar_posnode_spawn_height
Ogre::Vector3 getMaxGForces()
Builds and manages softbody actors (physics on background thread, networking)
Actor(ActorInstanceID_t actor_id, unsigned int vector_index, RigDef::DocumentPtr def, ActorSpawnRequest rq)
bool m_disable_default_sounds
Spawner context; TODO: remove.
void CalcBeams(bool trigger_hooks)
Simulation: An edge in the softbody structure.
AeroEngine * ar_aeroengines[MAX_AEROENGINES]
float getAvgPropedWheelRadius()
bool isPreloadedWithTerrain() const
void CalcShocks3(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
int * ar_nodes_id
Number in truck file, -1 for nodes generated by wheels/cinecam.
Screwprop * ar_screwprops[MAX_SCREWPROPS]
int ActorInstanceID_t
Unique sequentially generated ID of an actor in session. Use ActorManager::GetActorById()
static const float DEFAULT_COLLISION_RANGE
Ogre::Vector3 getVelocity() const
int m_stabilizer_shock_request
Physics state; values: { -1, 0, 1 }.
std::vector< authorinfo_t > authors
std::pair< float, float > ar_nb_beams_d_interval
Search interval for springiness & damping of regular beams.
void reset(bool keep_position=false)
call this one to reset a truck from any context
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
float getMinHeight(bool skip_virtual_nodes=true)
void removeWorkingTuneupDef()
Deletes the working tuneup def object if it exists.
float m_mouse_grab_move_force
int ar_airbrake_intensity
Physics state; values 0-5.
node_t * m_fusealge_front
Physics attr; defined in truckfile.
NodeNum_t ar_camera_node_roll[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; left node.
TransferCase * m_transfer_case
Physics.
std::vector< flare_t > ar_flares
int m_previous_gear
Sim state; land vehicle shifting.
bool tc_notoggle
Traction control attribute; Disable in-game toggle?
bool m_antilockbrake
GUI state.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
std::vector< authorinfo_t > getAuthors()
struct RoR::Actor::VehicleForceSensors m_force_sensors
Data for ForceFeedback devices.
bool m_slidenodes_locked
Physics state; Are SlideNodes locked?
int m_num_command_beams
TODO: Remove! Spawner context only; likely unused feature.
void HandleInputEvents(float dt)
collcab_rate_t ar_intra_collcabrate[MAX_CABS]
void AddInterActorBeam(beam_t *beam, ActorPtr other, ActorLinkingRequestType type)
Do not call directly - use MSG_SIM_ACTOR_LINKING_REQUESTED
void resetSlideNodePositions()
Recalculate SlideNode positions.
std::vector< char > veh_state
Actor properties (engine, brakes, lights, ...)
float ar_scale
Physics state; scale of the actor (nominal = 1.0)
std::vector< ActorPtr > ActorPtrVec
void DisjoinInterActorBeams()
Helper for MSG_ handlers, do not invoke by hand.
float cc_target_speed
Cruise Control.
std::pair< float, float > ar_nb_shocks_d_interval
Search interval for springiness & damping of shock beams.
bool Intersects(ActorPtr actor, Ogre::Vector3 offset=Ogre::Vector3::ZERO)
Slow intersection test.
TransferCase * getTransferCaseMode()
Toggles between 2WD and 4WD mode.
void resolveCollisions(Ogre::Vector3 direction)
Moves the actor at most 'direction.length()' meters towards 'direction' to resolve any collisions.
int ar_num_custom_particles
Ogre::Vector3 m_avg_node_velocity
average node velocity (compared to the previous frame step)
static const ActorInstanceID_t ACTORINSTANCEID_INVALID
static const int MAX_CPARTICLES
maximum number of custom particles per actor
PointColDetector * m_inter_point_col_detector
Physics.
TyrePressure & getTyrePressure()
Ogre::Vector3 m_camera_local_gforces_cur
Physics state (camera local)
void RemoveInterActorBeam(beam_t *beam, ActorLinkingRequestType type)
Do not call directly - use MSG_SIM_ACTOR_LINKING_REQUESTED
void requestRotation(float rotation, Ogre::Vector3 center)
std::pair< float, float > ar_nb_beams_k_interval
Search interval for springiness & damping of regular beams.
Ogre::String getSectionConfig()
void updateVisual(float dt=0)
Ogre::Vector3 ar_origin
Physics state; base position for softbody nodes.
Ogre::Vector3 calculateCollisionOffset(Ogre::Vector3 direction)
Virtually moves the actor at most 'direction.length()' meters towards 'direction' trying to resolve a...
void setFogLightsVisible(bool val)
static const int MAX_CAMERAS
maximum number of cameras per actor
void SyncReset(bool reset_position)
this one should be called only synchronously (without physics running in background)
void antilockbrakeToggle()
bool ar_hydro_speed_coupling
bool getHeadlightsVisible() const
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
std::string getTruckFileName()
void updateSlideNodePositions()
incrementally update the position of all SlideNodes
Ogre::Vector3 getPosition()
void scaleTruck(float value)
std::vector< std::string > m_description
void hookToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::HOOK_TOGGLE, NodeNum_t mousenode=NODENUM_INVALID, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
void NotifyActorCameraChanged()
Logic: sound, display; Notify this vehicle that camera changed;.
float ar_hydro_rudder_command
void ForceFeedbackStep(int steps)
bool getBrakeLightVisible() const
void WriteDiagnosticDump(std::string const &filename)
int ar_collcabs[MAX_CABS]
VehicleAIPtr getVehicleAI()
std::vector< beam_t * > ar_inter_beams
Beams connecting 2 actors.
float ar_hydro_aileron_state
bool ar_import_commands
Sim state.
std::vector< float > ar_minimass
minimum node mass in Kg
NodeNum_t ar_exhaust_dir_node
Old-format exhaust (one per vehicle) backwards direction node.
std::deque< float > cc_accs
Cruise Control.
Central state/object manager and communications hub.
size_t m_net_propanimkey_buf_size
For incoming/outgoing traffic; calculated on spawn.
Ogre::Quaternion getOrientation()
Physics: A vertex in the softbody structure.
bool ar_rescuer_flag
Gameplay attr; defined in truckfile. TODO: Does anybody use this anymore?
std::vector< Ogre::Entity * > m_deletion_entities
For unloading vehicle; filled at spawn.
std::vector< std::pair< float, float > > ar_initial_beam_defaults
void UpdateCruiseControl(float dt)
Defined in 'gameplay/CruiseControl.cpp'.
std::vector< std::pair< collision_box_t *, NodeNum_t > > m_active_eventboxes
CacheEntryPtr m_used_actor_entry
virtual ~Actor() override
std::vector< char > node_data
Compressed node positions.
float tc_timer
Traction control state;.
BitMask_t m_lightmask
RoRnet::Lightmask.
bool getSideLightsVisible() const
float m_dry_mass
Physics attr;.
std::vector< PropAnimKeyState > m_prop_anim_key_states
float ar_initial_total_mass
float ar_sleep_counter
Sim state; idle time counter.
float getHeightAboveGroundBelow(float height, bool skip_virtual_nodes=true)
Ogre::Vector3 getDirection()
average actor velocity, calculated using the actor positions of the last two frames
bool ar_camera_node_roll_inv[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; indicates roll node is right instead of left.
Ogre::Vector3 GetFFbBodyForces() const
NodeNum_t m_mouse_grab_node
Sim state; node currently being dragged by user.
GfxFlaresMode m_flares_mode
Snapshot of cvar 'gfx_flares_mode' on spawn.
int ar_nodes_name_top_length
For nicely formatted diagnostic output.
void updateSkidmarks()
Creates or updates skidmarks.
float ar_wheel_spin
Physics state; wheel speed in radians/s.
@ LIGHTMASK_BRAKES
brake lights on
std::vector< RailGroup * > m_railgroups
all the available RailGroups for this actor
float m_avionic_chatter_timer
Sound fx state (some pseudo random number, doesn't matter)
bool m_preloaded_with_terrain
Spawn context (TODO: remove!)
Replay * m_replay_handler
float getTotalMass(bool withLocked=true)
bool m_water_contact_old
Scripting state.
size_t m_net_total_buffer_size
For incoming/outgoing traffic; calculated on spawn.
CacheEntryPtr & getUsedActorEntry()
The actor entry itself.
TyrePressure m_tyre_pressure
void toggleSlideNodeLock()
bool tc_mode
Traction control state; Enabled? {1/0}.
float ar_hydro_elevator_state
void RecalculateNodeMasses(Ogre::Real total)
Previously 'calc_masses2()'.
int ar_num_cinecams
Sim attr;.
float ar_collision_range
Physics attr.
PerVehicleCameraContext * GetCameraContext()
std::vector< std::string > getManagedMaterialNames()
std::pair< float, float > ar_nb_wheels_k_interval
Search interval for springiness & damping of wheel / rim beams.
bool m_tractioncontrol
GUI state.
bool m_disable_smoke
Stops/starts smoke particles (i.e. exhausts, turbojets).
Ogre::Vector3 GetCameraRoll()
std::vector< std::vector< int > > ar_node_to_node_connections
void toggleTransferCaseMode()
void parkingbrakeToggle()
float ar_nb_mass_scale
Global mass scale (affects all nodes the same way)
float m_total_mass
Physics state; total mass in Kg.
bool CalcForcesEulerPrepare(bool doUpdate)
static const int MAX_CAMERARAIL
maximum number of camera rail points
size_t m_net_node_buf_size
For incoming/outgoing traffic; calculated on spawn.
float ar_brake_force
Physics attr; filled at spawn.
bool ar_is_police
Gfx/sfx attr.
bool cc_can_brake
Cruise Control.
float alb_timer
Anti-lock brake state;.
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
void setBeaconMode(bool val)
std::vector< Ogre::Vector3 > ar_initial_node_positions
int m_num_proped_wheels
Physics attr, filled at spawn - Number of propelled wheels.
float ar_elevator
Sim state; aerial controller.
std::pair< float, float > ar_nb_wheels_d_interval
Search interval for springiness & damping of wheel / rim beams.
bool m_has_axles_section
Temporary (legacy parsing helper) until central diffs are implemented.
Ogre::Real getMinimalCameraRadius()
bool ar_toggle_ties
Sim state.
void toggleBlinkType(BlinkType blink)
CacheEntryPtr m_used_skin_entry
Graphics.
float ar_hydro_aileron_command
CollisionBoxPtrVec m_potential_eventboxes
static const int MAX_SOUNDSCRIPTS_PER_TRUCK
maximum number of soundsscripts per actor
float ar_hydro_dir_command
ActorType ar_driveable
Sim attr; marks vehicle type and features.
Ogre::String getTransferCaseName()
Toggles between Hi and Lo mode.
void setSmokeEnabled(bool enabled)
Writes info to console/notify area.
std::vector< float > ar_initial_node_masses
NodeNum_t ar_exhaust_pos_node
Old-format exhaust (one per vehicle) emitter node.
Ogre::Vector3 getNodePosition(int nodeNumber)
Returns world position of node.
Differential * m_axle_diffs[1+MAX_WHEELS/2]
Physics.
std::pair< float, float > ar_nb_beams_scale
Scales for springiness & damping of regular beams.
void UpdatePropAnimInputEvents()
CacheEntryPtr & getUsedSkinEntry()
bool getHighBeamsVisible() const
bool alb_nodash
Anti-lock brake attribute: Hide the dashboard indicator?
PointColDetector * m_intra_point_col_detector
Physics.
void dispose()
Effectively destroys the object but keeps it in memory to satisfy shared pointers.
float m_odometer_total
GUI state.
float alb_minspeed
Anti-lock brake attribute;.
NodeNum_t ar_custom_camera_node
Sim state; custom tracking node for 3rd-person camera.
void tieToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::TIE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
std::vector< rope_t > ar_ropes
void resetSlideNodes()
Reset all the SlideNodes.
void ropeToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::ROPE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
float ar_hydro_elevator_command
Ogre::UTFString m_net_username
TuneupDefPtr m_working_tuneup_def
Each actor gets unique instance, even if loaded from .tuneup file in modcache.
void CalcBuoyance(bool doUpdate)
Ogre::Vector3 getRotationCenter()
void requestTranslation(Ogre::Vector3 translation)
void toggleTransferCaseGearRatio()
void CalcAircraftForces(bool doUpdate)
float alb_ratio
Anti-lock brake attribute: Regulating force.
float ar_anim_shift_timer
For 'animator' with flag 'shifter'.
Surface friction properties.
Ogre::Vector3 m_avg_node_position
average node position
float getShockVelocity(int shock_number)
float ar_top_speed
Sim state.
int GetNumActiveConnectedBeams(int nodeid)
Returns the number of active (non bounded) beams connected to a node.
std::vector< Ogre::AxisAlignedBox > ar_predicted_coll_bounding_boxes
void setCustomLightVisible(int number, bool visible)
void updateSlideNodeForces(const Ogre::Real delta_time_sec)
calculate and apply Corrective forces
static const int MAX_CABS
maximum number of cabs per actor
ground_model_t * ar_submesh_ground_model
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
Manager for all visuals belonging to a single actor.
float getMaxHeight(bool skip_virtual_nodes=true)
Ogre::String ar_design_name
Name of the vehicle/machine/object this actor represents.
int m_wheel_node_count
Static attr; filled at spawn.
int countFlaresByType(FlareType type)
bool alb_notoggle
Anti-lock brake attribute: Disable in-game toggle?
int countCustomLights(int control_number)
unsigned long ar_net_last_update_time
shock_t * ar_shocks
Shock absorbers.
std::vector< hydrobeam_t > ar_hydros
std::shared_ptr< Document > DocumentPtr
int ar_nb_skip_steps
Amount of physics steps to be skipped before measuring.
@ LIGHTMASK_BEACONS
beacons on
static const int MAX_WHEELS
maximum number of wheels per actor
void calculateAveragePosition()
std::string getTruckName()
Self reference-counting objects, as requred by AngelScript garbage collector.
wheel_t ar_wheels[MAX_WHEELS]
std::string ar_filehash
Attribute; filled at spawn.
bool alb_pulse_state
Anti-lock brake state;.
NodeNum_t ar_camera_node_pos[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; origin node.
bool m_custom_particles_enabled
Gfx state.
int ar_net_source_id
Unique ID of remote player who spawned this actor.
void updateSoundSources()
ActorType
< Aka 'Driveable'
void CalcBeamsInterActor()
bool m_beam_break_debug_enabled
Logging state.
static const int MAX_SCREWPROPS
maximum number of boat screws per actor
Ogre::Vector3 getGForces()
void CalcWheels(bool doUpdate, int num_steps)
void displayWheelDiffMode()
Cycles through the available inter wheel diff modes.
float ar_aileron
Sim state; aerial controller.
std::vector< ropable_t > ar_ropables
Ogre::Vector3 m_camera_gforces
Physics state (global)
void setAirbrakeIntensity(float intensity)
void engineTriggerHelper(int engineNumber, EngineTriggerType type, float triggerValue)
float m_handbrake_force
Physics attr; defined in truckfile.
BitMask_t getLightStateMask() const
bool ar_update_physics
Physics state; Should this actor be updated (locally) in the next physics step?
void updateDashBoards(float dt)
void prepareInside(bool inside)
Prepares vehicle for in-cabin camera use.
Ogre::Vector3 m_mouse_grab_pos
void updateInitPosition()
float ar_rudder
Sim state; aerial/marine controller.
float m_rotation_request
Accumulator.
int getShockNode1(int shock_number)
std::vector< Airbrake * > ar_airbrakes
void cruisecontrolToggle()
Defined in 'gameplay/CruiseControl.cpp'.
Ogre::AxisAlignedBox ar_evboxes_bounding_box
bounding box around nodes eligible for eventbox triggering
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.
soundsource_t ar_soundsources[MAX_SOUNDSCRIPTS_PER_TRUCK]
void setSideLightsVisible(bool val)
int ar_num_shocks
Number of shock absorbers.
void UpdateBoundingBoxes()
bool ar_guisettings_use_engine_max_rpm
float m_load_mass
Physics attr; predefined load mass in Kg.
bool m_beam_deform_debug_enabled
Logging state.
std::unique_ptr< GfxActor > m_gfx_actor
Ogre::Quaternion ar_main_camera_dir_corr
Sim attr;.
int m_anglesnap_request
Accumulator.
bool ar_has_active_shocks
Are there active stabilizer shocks?
Ogre::Vector3 m_camera_gforces_accu
Accumulator for 'camera' G-forces.
float ar_guisettings_shifter_anim_time
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
NodeNum_t ar_cinecam_node[MAX_CAMERAS]
Sim attr; Cine-camera node indexes.
void applyNodeBeamScales()
For GUI::NodeBeamUtils.
std::unique_ptr< Buoyance > m_buoyance
Physics.
void sendStreamData()
Send outgoing data.
void CalcShocks(bool doUpdate, int num_steps)
bool getCustomLightVisible(int number)
Ogre::Vector3 accu_body_forces
float ar_guisettings_speedo_max_kph
void displayTransferCaseMode()
Gets the current transfer case mode name (4WD Hi, ...)
bool m_blinker_left_lit
Blinking state of left turn signal.
bool isBeingReset() const
For backwards compatibility of the 'triggers' feature, the commandkey array must support negative ind...
void calcNodeConnectivityGraph()
Ogre::Vector3 out_body_forces
Ogre::Timer m_reset_timer