RigsofRods
Soft-body Physics Simulation
Actor.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2016-2024 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #pragma once
23 
24 #include "Application.h"
25 #include "CmdKeyInertia.h"
26 #include "Differentials.h"
27 #include "GfxActor.h"
29 #include "RigDef_Prerequisites.h"
30 #include "RoRnet.h"
31 #include "RefCountingObject.h"
32 #include "RefCountingObjectPtr.h"
33 #include "SimData.h"
34 #include "SoundScriptManager.h"
35 #include "TyrePressure.h"
36 #include "VehicleAI.h"
37 
38 #include <Ogre.h>
39 
40 namespace RoR {
41 
44 
49 class Actor : public RefCountingObject<Actor>
50 {
51  friend class ActorSpawner;
52  friend class ActorManager;
53  friend class GfxActor; // Temporary until all visuals are moved there. ~ only_a_ptr, 2018
54  friend class OutGauge;
55 public:
56 
57  Actor(
58  ActorInstanceID_t actor_id
59  , unsigned int vector_index
62  );
63 
64  virtual ~Actor() override;
65 
66  void dispose();
67 
70  void sendStreamSetup();
71  void sendStreamData();
72  void pushNetwork(char* data, int size);
73  void calcNetwork();
75 
78  // PLEASE maintain the same order as in 'scripting/bindings/ActorAngelscript.cpp' and 'doc/angelscript/.../BeamClass.h'
80  Ogre::Vector3 getPosition();
81  // AngelScript alias: `getVehiclePosition()`
82  float getRotation();
83  // AngelScript alias: `getHeadingDirectionAngle()`
84  Ogre::Quaternion getOrientation();
85  float getSpeed() { return m_avg_node_velocity.length(); };
86  Ogre::Vector3 getGForces() { return m_camera_local_gforces_cur; };
87  float getTotalMass(bool withLocked=true);
88  int getNodeCount() { return ar_num_nodes; }
89  Ogre::Vector3 getNodePosition(int nodeNumber);
90  bool isNodeWheelRim(int nodeNumber);
91  bool isNodeWheelTire(int nodeNumber);
92  int getWheelNodeCount() const;
93  float getWheelSpeed() const { return ar_wheel_speed; }
94  void reset(bool keep_position = false);
95  float getShockSpringRate(int shock_number);
96  float getShockDamping(int shock_number);
97  float getShockVelocity(int shock_number);
98  int getShockNode1(int shock_number);
99  int getShockNode2(int shock_number);
100  // not exported to scripting:
101  void resetPosition(Ogre::Vector3 translation, bool setInitPosition);
102  void resetPosition(float px, float pz, bool setInitPosition, float miny);
103  void requestRotation(float rotation, Ogre::Vector3 center) { m_rotation_request += rotation; m_rotation_request_center = center; };
104  void requestAngleSnap(int division) { m_anglesnap_request = division; };
105  void requestTranslation(Ogre::Vector3 translation) { m_translation_request += translation; };
106  int getShockCount() { return ar_num_shocks; }
107  Ogre::Vector3 getVelocity() const { return m_avg_node_velocity; };
108  Ogre::Vector3 getDirection();
109  Ogre::Vector3 getRotationCenter();
110  float getMinHeight(bool skip_virtual_nodes=true);
111  float getMaxHeight(bool skip_virtual_nodes=true);
112  float getHeightAboveGround(bool skip_virtual_nodes=true);
113  float getHeightAboveGroundBelow(float height, bool skip_virtual_nodes=true);
114  Ogre::Vector3 getMaxGForces() { return m_camera_local_gforces_max; };
115  bool hasSlidenodes() { return !m_slidenodes.empty(); };
116  void updateSlideNodePositions();
117  void updateSlideNodeForces(const Ogre::Real delta_time_sec);
118  void resetSlideNodePositions();
119  void resetSlideNodes();
120 
124  // PLEASE maintain the same order as in 'scripting/bindings/ActorAngelscript.cpp' and 'doc/angelscript/.../BeamClass.h'
125  void scaleTruck(float value);
126  void setMass(float m);
127  // not exported to scripting:
128  void applyNodeBeamScales();
129  void searchBeamDefaults();
130  void updateInitPosition();
132 
135  // PLEASE maintain the same order as in 'scripting/bindings/ActorAngelscript.cpp' and 'doc/angelscript/.../BeamClass.h'
136  void parkingbrakeToggle();
137  void tractioncontrolToggle();
138  void antilockbrakeToggle();
139  void toggleCustomParticles();
140  bool getCustomParticleMode();
141  // not exported to scripting:
142  void mouseMove(NodeNum_t node, Ogre::Vector3 pos, float force);
144  bool isTied();
146  bool isLocked();
148  void engineTriggerHelper(int engineNumber, EngineTriggerType type, float triggerValue);
149  void toggleSlideNodeLock();
151  void cruisecontrolToggle();
152  void toggleAxleDiffMode();
153  void displayAxleDiffMode();
155  void toggleWheelDiffMode();
156  void displayWheelDiffMode();
158  void toggleTransferCaseMode();
161  Ogre::String getTransferCaseName();
162  void displayTransferCaseMode();
163  void setSmokeEnabled(bool enabled) { m_disable_smoke = !enabled; }
164  bool getSmokeEnabled() const { return !m_disable_smoke; }
166 
169  // PLEASE maintain the same order as in 'scripting/bindings/ActorAngelscript.cpp' and 'doc/angelscript/.../BeamClass.h'
171  void setBlinkType(BlinkType blink);
172  void toggleBlinkType(BlinkType blink);
173  bool getCustomLightVisible(int number);
174  void setCustomLightVisible(int number, bool visible);
176  void beaconsToggle();
179  int countCustomLights(int control_number);
180  int countFlaresByType(FlareType type);
181  // not exported to scripting:
182  void toggleHeadlights();
184  void setLightStateMask(BitMask_t lightmask);
188  void setHeadlightsVisible(bool val) { if (val != this->getHeadlightsVisible()) { this->toggleHeadlights(); } }
195 
198  void updateSkidmarks();
199  void prepareInside(bool inside);
200  void updateFlareStates(float dt);
201  void updateVisual(float dt=0);
202  void updateDashBoards(float dt);
203  void forceAllFlaresOff();
205 
208  void updateSoundSources();
209  void muteAllSounds();
210  void unmuteAllSounds();
212 
216  Ogre::MaterialPtr getManagedMaterialInstance(const std::string& orig_name);
217  std::vector<std::string> getManagedMaterialNames();
218  // not exported to scripting:
219  Replay* getReplay();
222 
225  // PLEASE maintain the same ordering as in 'scripting/bindings/ActorAngelscript.cpp' and 'doc/angelscript/.../BeamClass.h'
226  std::string getTruckName() { return ar_design_name; }
227  std::string getTruckFileName() { return ar_filename; }
228  std::string getTruckFileResourceGroup();
229  int getTruckType() { return ar_driveable; }
230  Ogre::String getSectionConfig() { return m_section_config; }
231  int getInstanceId() { return ar_instance_id; }
232  // not exported to scripting:
236  void ensureWorkingTuneupDef();
237  void removeWorkingTuneupDef();
239  std::vector<authorinfo_t> getAuthors();
240  std::vector<std::string> getDescription();
242 
243  void ForceFeedbackStep(int steps);
244  void HandleInputEvents(float dt);
245  void HandleAngelScriptEvents(float dt);
246  void UpdateCruiseControl(float dt);
247  bool Intersects(ActorPtr actor, Ogre::Vector3 offset = Ogre::Vector3::ZERO);
248  void resolveCollisions(Ogre::Vector3 direction);
252  void resolveCollisions(float max_distance, bool consider_up);
253  float getSteeringAngle();
255  int GetNumActiveConnectedBeams(int nodeid);
256  void NotifyActorCameraChanged();
258  void setAirbrakeIntensity(float intensity);
259  void UpdateBoundingBoxes();
261  void UpdatePhysicsOrigin();
262  void SoftReset();
263  void SyncReset(bool reset_position);
264  void WriteDiagnosticDump(std::string const& filename);
266  Ogre::Vector3 GetCameraDir() { return (ar_nodes[ar_main_camera_node_pos].RelPosition - ar_nodes[ar_main_camera_node_dir].RelPosition).normalisedCopy(); }
267  Ogre::Vector3 GetCameraRoll() { return (ar_nodes[ar_main_camera_node_pos].RelPosition - ar_nodes[ar_main_camera_node_roll].RelPosition).normalisedCopy(); }
268  Ogre::Vector3 GetFFbBodyForces() const { return m_force_sensors.out_body_forces; }
269  GfxActor* GetGfxActor() { return m_gfx_actor.get(); }
271  Ogre::Real getMinimalCameraRadius();
273  bool isBeingReset() const { return m_ongoing_reset; };
275 
276  // -------------------- Public data -------------------- //
277 
278  // Nodes
279  node_t* ar_nodes = nullptr;
280  int* ar_nodes_id = nullptr;
281  std::string* ar_nodes_name = nullptr;
283  int ar_num_nodes = 0;
284  std::vector<float> ar_minimass;
286 
287  beam_t* ar_beams = nullptr;
288  int ar_num_beams = 0;
289  std::vector<beam_t*> ar_inter_beams;
290  shock_t* ar_shocks = nullptr;
291  int ar_num_shocks = 0;
292  bool ar_has_active_shocks = false;
293  rotator_t* ar_rotators = nullptr;
295  wing_t* ar_wings = nullptr;
296  int ar_num_wings = 0;
297  std::vector<authorinfo_t> authors;
298  std::vector<exhaust_t> exhausts;
299  std::vector<rope_t> ar_ropes;
300  std::vector<ropable_t> ar_ropables;
301  std::vector<tie_t> ar_ties;
302  std::vector<hook_t> ar_hooks;
303  std::vector<flare_t> ar_flares;
304  std::vector<Airbrake*> ar_airbrakes;
306  Ogre::AxisAlignedBox ar_bounding_box;
307  Ogre::AxisAlignedBox ar_evboxes_bounding_box;
308  Ogre::AxisAlignedBox ar_predicted_bounding_box;
310  std::vector<float> ar_initial_node_masses;
311  std::vector<Ogre::Vector3> ar_initial_node_positions;
312  std::vector<std::pair<float, float>> ar_initial_beam_defaults;
313  std::vector<wheeldetacher_t> ar_wheeldetachers;
314  std::vector<std::vector<int>> ar_node_to_node_connections;
315  std::vector<std::vector<int>> ar_node_to_beam_connections;
316  std::vector<Ogre::AxisAlignedBox> ar_collision_bounding_boxes;
317  std::vector<Ogre::AxisAlignedBox> ar_predicted_coll_bounding_boxes;
318  std::map<std::string, Ogre::MaterialPtr> ar_managed_materials;
319  std::vector<UniqueCommandKeyPair> ar_unique_commandkey_pairs;
320 
324  int ar_num_wheels = 0;
333  int ar_cabs[MAX_CABS * 3] = {};
334  int ar_num_cabs = 0;
335  std::vector<hydrobeam_t> ar_hydros;
345  bool ar_hide_in_actor_list = false;
346  Ogre::String ar_design_name;
348  float alb_ratio = 0.f;
349  float alb_minspeed = 0.f;
350  bool alb_mode = false;
351  float alb_pulse_time = 0.f;
352  bool alb_pulse_state = false;
353  bool alb_nodash = false;
354  bool alb_notoggle = false;
355  float alb_timer = 0.f;
356  float tc_ratio = 0.f;
357  bool tc_mode = false;
358  float tc_pulse_time = 0.f;
359  bool tc_pulse_state = 0.f;
360  bool tc_nodash = false;
361  bool tc_notoggle = false;
362  float tc_timer = 0.f;
363  float ar_anim_shift_timer = 0.f;
364  bool cc_mode = false;
365  bool cc_can_brake = false;
366  float cc_target_rpm = 0.f;
367  float cc_target_speed = 0.f;
369  std::deque<float> cc_accs;
370  bool sl_enabled = false;
371  float sl_speed_limit = 0.f;
377  unsigned int ar_vector_index = 0;
379  EngineSim* ar_engine = nullptr;
381  int ar_num_cinecams = 0;
383  float ar_brake_force = 0.f;
384 
385  Ogre::Vector3 ar_origin = Ogre::Vector3::ZERO;
386  int ar_num_cameras = 0;
387  Ogre::Quaternion ar_main_camera_dir_corr = Ogre::Quaternion::IDENTITY;
395 
398  float ar_scale = 1.f;
399  Ogre::Real ar_brake = 0.f;
400  float ar_wheel_speed = 0.f;
401  float ar_wheel_spin = 0.f;
402  float ar_avg_wheel_speed = 0.f;
403  float ar_hydro_dir_command = 0.f;
404  float ar_hydro_dir_state = 0.f;
405  Ogre::Real ar_hydro_dir_wheel_display = 0.f;
412  float ar_sleep_counter = 0.f;
414  bool ar_parking_brake = false;
416  float ar_left_mirror_angle = 0.52f;
417  float ar_right_mirror_angle = -0.52f;
418  float ar_elevator = 0.f;
419  float ar_rudder = 0.f;
420  float ar_aileron = 0.f;
421  int ar_aerial_flap = 0;
422  Ogre::Vector3 ar_fusedrag = Ogre::Vector3::ZERO;
425  std::string ar_filename;
426  std::string ar_filehash;
430  std::map<int,int> ar_net_stream_results;
431  Ogre::Timer ar_net_timer;
432  unsigned long ar_net_last_update_time = 0;
435  float ar_top_speed = 0.f;
438  std::vector<std::pair<collision_box_t*, NodeNum_t>> m_active_eventboxes;
439 
440  // Guisettings
444 
445  // Gameplay state
448 
449  // Repair state
450  Ogre::Vector3 m_rotation_request_center = Ogre::Vector3::ZERO;
451  float m_rotation_request = 0.f;
453  Ogre::Vector3 m_translation_request = Ogre::Vector3::ZERO;
454 
455  // Realtime node/beam structure editing helpers
456  bool ar_nb_initialized = false;
457  std::vector<float> ar_nb_optimum;
458  std::vector<float> ar_nb_reference;
461  float ar_nb_mass_scale = 1.f;
462  std::pair<float, float> ar_nb_beams_scale;
463  std::pair<float, float> ar_nb_shocks_scale;
464  std::pair<float, float> ar_nb_wheels_scale;
465  std::pair<float, float> ar_nb_beams_d_interval;
466  std::pair<float, float> ar_nb_beams_k_interval;
467  std::pair<float, float> ar_nb_shocks_d_interval;
468  std::pair<float, float> ar_nb_shocks_k_interval;
469  std::pair<float, float> ar_nb_wheels_d_interval;
470  std::pair<float, float> ar_nb_wheels_k_interval;
471 
472  // Bit flags
478  bool ar_is_police:1;
483  bool ar_toggle_ties:1;
485 
486 private:
487 
488  bool CalcForcesEulerPrepare(bool doUpdate);
489  void CalcAircraftForces(bool doUpdate);
490  void CalcForcesEulerCompute(bool doUpdate, int num_steps);
491  void CalcAnimators(hydrobeam_t const& hydrobeam, float &cstate, int &div);
492  void CalcBeams(bool trigger_hooks);
493  void CalcBeamsInterActor();
494  void CalcBuoyance(bool doUpdate);
495  void CalcCommands(bool doUpdate);
496  void CalcCabCollisions();
497  void CalcDifferentials();
498  void CalcForceFeedback(bool doUpdate);
499  void CalcFuseDrag();
500  void CalcHooks();
501  void CalcHydros();
502  void CalcMouse();
503  void CalcNodes();
504  void CalcEventBoxes();
505  void CalcReplay();
506  void CalcRopes();
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);
511  void CalcTies();
512  void CalcTruckEngine(bool doUpdate);
513  void CalcWheels(bool doUpdate, int num_steps);
514 
515  void DetermineLinkedActors();
516  void RecalculateNodeMasses(Ogre::Real total);
518  void AddInterActorBeam(beam_t* beam, ActorPtr other, ActorLinkingRequestType type);
520  void DisjoinInterActorBeams();
521  void autoBlinkReset();
522  void ResetAngle(float rot);
523  void calculateLocalGForces();
524  // Both PointColDetectors need to be updated accordingly before calling this
527  Ogre::Vector3 calculateCollisionOffset(Ogre::Vector3 direction);
531  std::pair<RailGroup*, Ogre::Real> GetClosestRailOnActor( ActorPtr actor, const SlideNode& node);
532 
533  // -------------------- data -------------------- //
534 
535  std::vector<std::shared_ptr<Task>> m_flexbody_tasks;
537  std::unique_ptr<GfxActor> m_gfx_actor;
539  Ogre::String m_section_config;
540  std::vector<SlideNode> m_slidenodes;
541  std::vector<RailGroup*> m_railgroups;
542  std::vector<Ogre::Entity*> m_deletion_entities;
543  std::vector<Ogre::SceneNode*> m_deletion_scene_nodes;
547  float m_avionic_chatter_timer = 11.f;
550 
551  Ogre::Vector3 m_avg_node_position = Ogre::Vector3::ZERO;
552  Ogre::Real m_min_camera_radius = 0.f;
553  Ogre::Vector3 m_avg_node_position_prev = Ogre::Vector3::ZERO;
554  Ogre::Vector3 m_avg_node_velocity = Ogre::Vector3::ZERO;
557  float m_total_mass = 0.f;
559  Ogre::Vector3 m_mouse_grab_pos = Ogre::Vector3::ZERO;
561  float m_spawn_rotation = 0.f;
562  Ogre::Timer m_reset_timer;
563  Ogre::Vector3 m_camera_gforces_accu = Ogre::Vector3::ZERO;
564  Ogre::Vector3 m_camera_gforces = Ogre::Vector3::ZERO;
565  Ogre::Vector3 m_camera_local_gforces_cur = Ogre::Vector3::ZERO;
566  Ogre::Vector3 m_camera_local_gforces_max = Ogre::Vector3::ZERO;
575  int m_previous_gear = 0;
576  float m_handbrake_force = 0.f;
579  node_t* m_fusealge_back = nullptr;
580  float m_fusealge_width = 0.f;
581  float m_odometer_total = 0.f;
582  float m_odometer_user = 0.f;
584  float m_load_mass = 0.f;
585  int m_masscount = 0;
586  float m_dry_mass = 0.f;
587  std::unique_ptr<Buoyance> m_buoyance;
592  bool m_antilockbrake = false;
593  bool m_tractioncontrol = false;
594  bool m_ongoing_reset = false;
595  bool m_has_axles_section = false;
597  std::vector<std::string> m_description;
598  std::vector<PropAnimKeyState> m_prop_anim_key_states;
599 
602  size_t m_net_node_buf_size = 0;
603  size_t m_net_wheel_buf_size = 0;
608 
609  Ogre::UTFString m_net_username;
612 
617  bool m_blinker_autoreset = false;
618  bool m_blinker_left_lit = false;
619  bool m_blinker_right_lit = false;
620 
635 
637  {
638  inline void Reset()
639  {
640  accu_body_forces = Ogre::Vector3::ZERO;
641  accu_hydros_forces = 0;
642  out_body_forces = Ogre::Vector3::ZERO;
643  out_hydros_forces = 0;
644  };
645 
646  Ogre::Vector3 accu_body_forces;
648  Ogre::Vector3 out_body_forces;
650  } m_force_sensors;
651 
652  struct NetUpdate
653  {
654  std::vector<char> veh_state;
655  std::vector<char> node_data;
656  std::vector<float> wheel_data;
657  };
658 
659  std::deque<NetUpdate> m_net_updates;
660 };
661 
663 
664 } // namespace RoR
RoR::Actor::CalcTruckEngine
void CalcTruckEngine(bool doUpdate)
Definition: ActorForcesEuler.cpp:1083
RoR::Actor::m_blinker_right_lit
bool m_blinker_right_lit
Blinking state of right turn signal.
Definition: Actor.h:619
RoR::Actor::setHighBeamsVisible
void setHighBeamsVisible(bool val)
Definition: Actor.h:190
RoR::Actor::CalcNodes
void CalcNodes()
Definition: ActorForcesEuler.cpp:1532
RoR::Actor::getAxleDiffMode
int getAxleDiffMode()
Writes info to console/notify box.
Definition: Actor.h:154
RoR::Actor::ar_anim_previous_crank
float ar_anim_previous_crank
For 'animator' with flag 'torque'.
Definition: Actor.h:347
RoRnet::LIGHTMASK_SIDELIGHTS
@ LIGHTMASK_SIDELIGHTS
Definition: RoRnet.h:117
RoR::Actor::m_translation_request
Ogre::Vector3 m_translation_request
Accumulator.
Definition: Actor.h:453
RoR::Actor::ar_avg_wheel_speed
float ar_avg_wheel_speed
Physics state; avg wheel speed in m/s.
Definition: Actor.h:402
RoR::Actor::searchBeamDefaults
void searchBeamDefaults()
Searches for more stable beam defaults.
Definition: Actor.cpp:1805
RoR::Actor::ar_nodes_name
std::string * ar_nodes_name
Name in truck file, only if defined with 'nodes2'.
Definition: Actor.h:281
RoR::Actor::resetPosition
void resetPosition(Ogre::Vector3 translation, bool setInitPosition)
Moves the actor to given world coords.
Definition: Actor.cpp:1315
RoR::Actor::ar_collision_bounding_boxes
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...
Definition: Actor.h:316
RoR::Actor::cc_mode
bool cc_mode
Cruise Control.
Definition: Actor.h:364
RoR::Actor::ar_num_contactable_nodes
int ar_num_contactable_nodes
Total number of nodes which can contact ground or cabs.
Definition: Actor.h:321
RoR::Actor::m_odometer_user
float m_odometer_user
GUI state.
Definition: Actor.h:582
RoR::Actor::getWheelDiffMode
int getWheelDiffMode()
Writes info to console/notify box.
Definition: Actor.h:157
RoR::Actor::pushNetwork
void pushNetwork(char *data, int size)
Process incoming data; fills actor's data buffers and flips them. Called by the network thread....
Definition: Actor.cpp:437
RoR::Actor::getMinCameraRadius
float getMinCameraRadius()
Definition: Actor.h:254
RoR::Actor
Softbody object; can be anything from soda can to a space shuttle Constructed from a truck definition...
Definition: Actor.h:49
RoR::Actor::ar_main_camera_node_pos
NodeNum_t ar_main_camera_node_pos
Sim attr; ar_camera_node_pos[0] >= 0 ? ar_camera_node_pos[0] : 0.
Definition: Actor.h:388
RoR::Actor::ar_vehicle_ai
VehicleAIPtr ar_vehicle_ai
Definition: Actor.h:397
RoR::Actor::CalcCommands
void CalcCommands(bool doUpdate)
Definition: ActorForcesEuler.cpp:737
RoR::Actor::m_slidenodes
std::vector< SlideNode > m_slidenodes
all the SlideNodes available on this actor
Definition: Actor.h:540
RoR::Actor::getWheelSpeed
float getWheelSpeed() const
Definition: Actor.h:93
RoRnet::LIGHTMASK_FOGLIGHTS
@ LIGHTMASK_FOGLIGHTS
Definition: RoRnet.h:116
RoR::Actor::ar_nb_optimum
std::vector< float > ar_nb_optimum
Temporary storage of the optimum search result.
Definition: Actor.h:457
RoR::Actor::getSpeed
float getSpeed()
Definition: Actor.h:85
RoR::Actor::ar_last_fuzzy_ground_model
ground_model_t * ar_last_fuzzy_ground_model
GUI state.
Definition: Actor.h:436
RoR::Actor::ar_camera_node_dir
NodeNum_t ar_camera_node_dir[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; back node.
Definition: Actor.h:392
RoR::Actor::VehicleForceSensors::out_hydros_forces
float out_hydros_forces
Definition: Actor.h:649
RoR::Actor::isNodeWheelRim
bool isNodeWheelRim(int nodeNumber)
Is node marked as wheel rim? Note some wheel models use only tire nodes. See https://docs....
Definition: Actor.cpp:4605
RoR::Actor::getBeaconMode
bool getBeaconMode() const
Definition: Actor.h:175
BITMASK_SET
void BITMASK_SET(BitMask_t &mask, BitMask_t flag, bool val)
Definition: BitFlags.h:19
RoR::Actor::m_section_config
Ogre::String m_section_config
Definition: Actor.h:539
RoR::Actor::GetClosestRailOnActor
std::pair< RailGroup *, Ogre::Real > GetClosestRailOnActor(ActorPtr actor, const SlideNode &node)
Definition: ActorSlideNode.cpp:73
PerVehicleCameraContext.h
RoR::Actor::hasSlidenodes
bool hasSlidenodes()
Definition: Actor.h:115
RoR::Actor::NetUpdate
Definition: Actor.h:652
RoR::Actor::getShockNode2
int getShockNode2(int shock_number)
Definition: Actor.cpp:4779
RoR::Actor::ar_buoycabs
int ar_buoycabs[MAX_CABS]
Definition: Actor.h:340
RoR::Actor::setLightStateMask
void setLightStateMask(BitMask_t lightmask)
Does all the necessary toggling.
Definition: Actor.cpp:3156
RoR::Actor::ar_hydro_dir_state
float ar_hydro_dir_state
Definition: Actor.h:404
RoR::Actor::ar_physics_paused
bool ar_physics_paused
Sim state.
Definition: Actor.h:484
RoR::Actor::ensureWorkingTuneupDef
void ensureWorkingTuneupDef()
Creates a working tuneup def if it doesn't exist yet.
Definition: Actor.cpp:4729
RoR::Actor::m_fusealge_back
node_t * m_fusealge_back
Physics attr; defined in truckfile.
Definition: Actor.h:579
RoR::Actor::isLocked
bool isLocked()
Are hooks locked?
Definition: Actor.cpp:3883
RoR::Actor::ar_inter_collcabrate
collcab_rate_t ar_inter_collcabrate[MAX_CABS]
Definition: Actor.h:337
RoR::Actor::getNodeCount
int getNodeCount()
Definition: Actor.h:88
RoR::Actor::ar_extern_camera_node
NodeNum_t ar_extern_camera_node
Definition: Actor.h:373
RoR::Actor::GetFFbHydroForces
float GetFFbHydroForces() const
Definition: Actor.h:272
RoR::Actor::ar_extern_camera_mode
ExtCameraMode ar_extern_camera_mode
Definition: Actor.h:372
RoR::Actor::ar_filename
std::string ar_filename
Attribute; filled at spawn.
Definition: Actor.h:425
RoR::Actor::ar_nb_reference
std::vector< float > ar_nb_reference
Temporary storage of the reference search result.
Definition: Actor.h:458
RoR::Actor::m_water_contact
bool m_water_contact
Scripting state.
Definition: Actor.h:625
RoR::Actor::toggleAxleDiffMode
void toggleAxleDiffMode()
Definition: Actor.cpp:1355
RoR::Actor::ar_hydro_dir_wheel_display
Ogre::Real ar_hydro_dir_wheel_display
Definition: Actor.h:405
RoR::Actor::alb_pulse_time
float alb_pulse_time
Anti-lock brake attribute;.
Definition: Actor.h:351
RoR::Actor::setHeadlightsVisible
void setHeadlightsVisible(bool val)
Definition: Actor.h:188
RoR::Actor::ar_custom_particles
cparticle_t ar_custom_particles[MAX_CPARTICLES]
Definition: Actor.h:325
RoR::Actor::m_num_wheel_diffs
int m_num_wheel_diffs
Physics attr.
Definition: Actor.h:572
RoR::Actor::getSmokeEnabled
bool getSmokeEnabled() const
Definition: Actor.h:164
RoR::Actor::ar_vector_index
unsigned int ar_vector_index
Sim attr; actor element index in std::vector<m_actors>
Definition: Actor.h:377
VehicleAI.h
Simple waypoint AI.
RoR::Actor::CalcForceFeedback
void CalcForceFeedback(bool doUpdate)
Definition: ActorForcesEuler.cpp:69
RoR::Actor::m_trigger_debug_enabled
bool m_trigger_debug_enabled
Logging state.
Definition: Actor.h:632
RoR::Actor::ar_parking_brake
bool ar_parking_brake
Definition: Actor.h:414
RoR::Actor::CalcCabCollisions
void CalcCabCollisions()
Definition: Actor.cpp:2500
RoR::Actor::ar_disable_aerodyn_turbulent_drag
bool ar_disable_aerodyn_turbulent_drag
Physics state.
Definition: Actor.h:474
RoR::Actor::ar_collision_relevant
bool ar_collision_relevant
Physics state;.
Definition: Actor.h:477
RoR::Actor::ar_linked_actors
ActorPtrVec ar_linked_actors
BEWARE: Includes indirect links, see DetermineLinkedActors(); Other actors linked using 'hooks/ties/r...
Definition: Actor.h:447
RoR::Actor::GetCameraDir
Ogre::Vector3 GetCameraDir()
Definition: Actor.h:266
RoR::Actor::autoBlinkReset
void autoBlinkReset()
Resets the turn signal when the steering wheel is turned back.
Definition: Actor.cpp:3127
RoR::Actor::getCustomParticleMode
bool getCustomParticleMode()
Definition: Actor.cpp:4556
RigDef_Prerequisites.h
RoR::Actor::ar_instance_id
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
Definition: Actor.h:376
RoR::Actor::m_net_first_wheel_node
int m_net_first_wheel_node
Network attr; Determines data buffer layout; calculated on spawn.
Definition: Actor.h:607
RoR::Actor::ar_num_nodes
int ar_num_nodes
Definition: Actor.h:283
RoR::Actor::cc_target_rpm
float cc_target_rpm
Cruise Control.
Definition: Actor.h:366
RoR::Actor::ar_engine_hydraulics_ready
bool ar_engine_hydraulics_ready
Sim state; does engine have enough RPM to power hydraulics?
Definition: Actor.h:475
RoR::Actor::unmuteAllSounds
void unmuteAllSounds()
Definition: Actor.cpp:3830
RoR::Actor::isNodeWheelTire
bool isNodeWheelTire(int nodeNumber)
Is node marked as wheel tire? Note some wheel models use only tire nodes. See https://docs....
Definition: Actor.cpp:4617
RoR::Actor::ar_bounding_box
Ogre::AxisAlignedBox ar_bounding_box
standard bounding box (surrounds all nodes of an actor)
Definition: Actor.h:306
RoR::Actor::tc_ratio
float tc_ratio
Traction control attribute: Regulating force.
Definition: Actor.h:356
RoR::Actor::m_deletion_scene_nodes
std::vector< Ogre::SceneNode * > m_deletion_scene_nodes
For unloading vehicle; filled at spawn.
Definition: Actor.h:543
RoR::Actor::exhausts
std::vector< exhaust_t > exhausts
Definition: Actor.h:298
RoR::Actor::m_num_axle_diffs
int m_num_axle_diffs
Physics attr.
Definition: Actor.h:570
RoR::Actor::getHeightAboveGround
float getHeightAboveGround(bool skip_virtual_nodes=true)
Definition: Actor.cpp:1534
RoR::Actor::m_wheel_diffs
Differential * m_wheel_diffs[MAX_WHEELS/2]
Physics.
Definition: Actor.h:571
RoR::Actor::m_fusealge_width
float m_fusealge_width
Physics attr; defined in truckfile.
Definition: Actor.h:580
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition: ForwardDeclarations.h:53
RoR::Actor::ar_unique_commandkey_pairs
std::vector< UniqueCommandKeyPair > ar_unique_commandkey_pairs
UI helper for displaying command control keys to user (must be built at spawn).
Definition: Actor.h:319
RoR::Actor::getFogLightsVisible
bool getFogLightsVisible() const
Definition: Actor.h:191
RoR::Actor::toggleWheelDiffMode
void toggleWheelDiffMode()
Definition: Actor.cpp:1347
RoR::Actor::mouseMove
void mouseMove(NodeNum_t node, Ogre::Vector3 pos, float force)
Definition: Actor.cpp:1340
RoR::Actor::ar_fusedrag
Ogre::Vector3 ar_fusedrag
Physics state.
Definition: Actor.h:422
RoR::wheel_t
Definition: SimData.h:421
RoR::Actor::getWheelNodeCount
int getWheelNodeCount() const
Definition: Actor.cpp:866
RoR::Actor::ar_nb_shocks_k_interval
std::pair< float, float > ar_nb_shocks_k_interval
Search interval for springiness & damping of shock beams.
Definition: Actor.h:468
RoR::Actor::sendStreamSetup
void sendStreamSetup()
Definition: Actor.cpp:1943
RoR::Actor::ar_buoycab_types
int ar_buoycab_types[MAX_CABS]
Definition: Actor.h:341
RoR::Actor::m_proped_wheel_pairs
int m_proped_wheel_pairs[MAX_WHEELS]
Physics attr; For inter-differential locking.
Definition: Actor.h:544
RoR::Actor::forceAllFlaresOff
void forceAllFlaresOff()
Definition: Actor.cpp:3016
RoRnet::LIGHTMASK_REVERSE
@ LIGHTMASK_REVERSE
reverse light on
Definition: RoRnet.h:119
RoR::Actor::m_min_camera_radius
Ogre::Real m_min_camera_radius
Definition: Actor.h:552
RoR::Actor::m_definition
RigDef::DocumentPtr m_definition
Definition: Actor.h:536
RoR::Actor::CalcAnimators
void CalcAnimators(hydrobeam_t const &hydrobeam, float &cstate, int &div)
Definition: Actor.cpp:2111
RoR::Actor::ar_brake
Ogre::Real ar_brake
Physics state; braking intensity.
Definition: Actor.h:399
RoR::Actor::sl_enabled
bool sl_enabled
Speed limiter;.
Definition: Actor.h:370
RoR::Actor::getShockSpringRate
float getShockSpringRate(int shock_number)
Definition: Actor.cpp:4743
RoR::Actor::ar_engine
EngineSim * ar_engine
Definition: Actor.h:379
TyrePressure.h
Wheel 'pressure adjustment' logic (only for 'wheels2')
RoR::Actor::tc_pulse_time
float tc_pulse_time
Traction control attribute;.
Definition: Actor.h:358
RoR::Actor::m_masscount
int m_masscount
Physics attr; Number of nodes loaded with l option.
Definition: Actor.h:585
RoR::Actor::RequestUpdateHudFeatures
void RequestUpdateHudFeatures()
Definition: Actor.h:270
RoR::ActorLinkingRequestType::HOOK_TOGGLE
@ HOOK_TOGGLE
RoR::Actor::getDescription
std::vector< std::string > getDescription()
Definition: Actor.cpp:4468
RoR::Actor::ResetAngle
void ResetAngle(float rot)
Definition: Actor.cpp:1227
RoR::Actor::toggleCustomParticles
void toggleCustomParticles()
Definition: Actor.cpp:3179
RoR::Actor::ar_toggle_ropes
bool ar_toggle_ropes
Sim state.
Definition: Actor.h:482
RoR::Actor::calculateLocalGForces
void calculateLocalGForces()
Derive the truck local g-forces from the global ones.
Definition: Actor.cpp:4338
RoR::Actor::ar_num_rotators
int ar_num_rotators
Definition: Actor.h:294
RoR::Actor::HandleAngelScriptEvents
void HandleAngelScriptEvents(float dt)
Definition: Actor.cpp:1793
RoR::Actor::m_blinker_autoreset
bool m_blinker_autoreset
When true, we're steering and blinker will turn off automatically.
Definition: Actor.h:617
RoR::CollisionBoxPtrVec
std::vector< collision_box_t * > CollisionBoxPtrVec
Definition: SimData.h:736
RoR::Actor::ar_hooks
std::vector< hook_t > ar_hooks
Definition: Actor.h:302
RoR::Actor::ar_nb_shocks_scale
std::pair< float, float > ar_nb_shocks_scale
Scales for springiness & damping of shock beams.
Definition: Actor.h:463
RoR::Actor::ar_current_cinecam
int ar_current_cinecam
Sim state; index of current CineCam (-1 if using 3rd-person camera)
Definition: Actor.h:423
RoR::Actor::getShockDamping
float getShockDamping(int shock_number)
Definition: Actor.cpp:4752
RoR::Actor::m_net_node_compression
float m_net_node_compression
For incoming/outgoing traffic; calculated on spawn.
Definition: Actor.h:606
RoR::EngineSim
A land vehicle engine + transmission.
Definition: EngineSim.h:35
RoR::Actor::m_hud_features_ok
bool m_hud_features_ok
Gfx state; Are HUD features matching actor's capabilities?
Definition: Actor.h:622
RoR::Actor::ar_trailer_parking_brake
bool ar_trailer_parking_brake
Definition: Actor.h:415
RoR::Actor::ar_wheeldetachers
std::vector< wheeldetacher_t > ar_wheeldetachers
Definition: Actor.h:313
RoR::Actor::UpdatePhysicsOrigin
void UpdatePhysicsOrigin()
Definition: Actor.cpp:1214
RoR::Actor::ar_ties
std::vector< tie_t > ar_ties
Definition: Actor.h:301
RoR::Actor::CalcTriggers
void CalcTriggers(int i, Ogre::Real difftoBeamL, bool update_hooks)
Definition: Actor.cpp:2664
RoR::Actor::sl_speed_limit
float sl_speed_limit
Speed limiter;.
Definition: Actor.h:371
RoR::Actor::cc_target_speed_lower_limit
float cc_target_speed_lower_limit
Cruise Control.
Definition: Actor.h:368
RoR::Actor::getTruckState
ActorState getTruckState()
Definition: Actor.h:79
RoR::Actor::m_stabilizer_shock_ratio
float m_stabilizer_shock_ratio
Physics state.
Definition: Actor.h:567
RoR::FlareType
FlareType
Definition: SimData.h:229
RoR::Actor::ar_net_stream_results
std::map< int, int > ar_net_stream_results
Definition: Actor.h:430
RoR::Actor::m_avg_node_position_prev
Ogre::Vector3 m_avg_node_position_prev
Definition: Actor.h:553
RoR::Actor::CalcForcesEulerCompute
void CalcForcesEulerCompute(bool doUpdate, int num_steps)
Definition: ActorForcesEuler.cpp:46
RoR::Actor::getTruckFileResourceGroup
std::string getTruckFileResourceGroup()
Definition: Actor.cpp:4709
RoR::Actor::ar_main_camera_node_dir
NodeNum_t ar_main_camera_node_dir
Sim attr; ar_camera_node_dir[0] >= 0 ? ar_camera_node_dir[0] : 0.
Definition: Actor.h:389
RoR::AeroEngine
Definition: AeroEngine.h:36
RoR::Actor::GetGfxActor
GfxActor * GetGfxActor()
Definition: Actor.h:269
RoR::Actor::ar_hide_in_actor_list
bool ar_hide_in_actor_list
Hide in list of spawned actors (available in top menubar). Useful for fixed-place machinery,...
Definition: Actor.h:345
RoR::Actor::ar_num_cabs
int ar_num_cabs
Definition: Actor.h:334
RoR::Actor::ar_node_to_beam_connections
std::vector< std::vector< int > > ar_node_to_beam_connections
Definition: Actor.h:315
RoR::Actor::ar_predicted_bounding_box
Ogre::AxisAlignedBox ar_predicted_bounding_box
Definition: Actor.h:308
RoR::Actor::ar_aerial_flap
int ar_aerial_flap
Sim state; state of aircraft flaps (values: 0-5)
Definition: Actor.h:421
RoR::ActorLinkingRequestType::ROPE_TOGGLE
@ ROPE_TOGGLE
RoR::Actor::CalcShocks2
void CalcShocks2(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
Definition: Actor.cpp:2521
RoR::Actor::m_stabilizer_shock_sleep
float m_stabilizer_shock_sleep
Sim state.
Definition: Actor.h:555
RoR::ActorState::LOCAL_SIMULATED
@ LOCAL_SIMULATED
simulated (local) actor
RoR::Actor::ar_hydro_rudder_state
float ar_hydro_rudder_state
Definition: Actor.h:409
RoR::Actor::getReverseLightVisible
bool getReverseLightVisible() const
Definition: Actor.h:178
RoR::NOT_DRIVEABLE
@ NOT_DRIVEABLE
not drivable at all
Definition: SimData.h:92
RoR::Actor::NetUpdate::wheel_data
std::vector< float > wheel_data
Wheel rotations.
Definition: Actor.h:656
Differentials.h
RoR::Actor::ar_nb_measure_steps
int ar_nb_measure_steps
Amount of physics steps to be measured.
Definition: Actor.h:460
RoR::Actor::CalcRopes
void CalcRopes()
Definition: ActorForcesEuler.cpp:1769
RoR::Actor::CalcTies
void CalcTies()
Definition: ActorForcesEuler.cpp:1052
RoR::Actor::displayAxleDiffMode
void displayAxleDiffMode()
Cycles through the available inter axle diff modes.
Definition: Actor.cpp:1363
RoR::Actor::getManagedMaterialInstance
Ogre::MaterialPtr getManagedMaterialInstance(const std::string &orig_name)
Definition: Actor.cpp:4574
RoR::Actor::m_net_updates
std::deque< NetUpdate > m_net_updates
Incoming stream of NetUpdates.
Definition: Actor.h:659
RoR::Actor::ar_dashboard
DashBoardManager * ar_dashboard
Definition: Actor.h:433
RoR::Actor::tractioncontrolToggle
void tractioncontrolToggle()
Definition: Actor.cpp:3791
RoR::Actor::m_skid_trails
Skidmark * m_skid_trails[MAX_WHEELS *2]
Definition: Actor.h:591
RefCountingObjectPtr< VehicleAI >
RoR::Actor::ar_nb_wheels_scale
std::pair< float, float > ar_nb_wheels_scale
Scales for springiness & damping of wheel / rim beams.
Definition: Actor.h:464
RoR::Actor::beaconsToggle
void beaconsToggle()
Definition: Actor.cpp:3800
RoR::Actor::m_camera_context
PerVehicleCameraContext m_camera_context
Definition: Actor.h:538
RoR::Differential
Definition: Differentials.h:66
RoR::Actor::ar_forward_commands
bool ar_forward_commands
Sim state.
Definition: Actor.h:480
RoR::Actor::DetermineLinkedActors
void DetermineLinkedActors()
Definition: Actor.cpp:825
RoR::Actor::m_ongoing_reset
bool m_ongoing_reset
Hack to prevent position/rotation creep during interactive truck reset.
Definition: Actor.h:594
RoR::Actor::m_avg_proped_wheel_radius
float m_avg_proped_wheel_radius
Physics attr, filled at spawn - Average proped wheel radius.
Definition: Actor.h:546
RoR::Actor::getInstanceId
int getInstanceId()
Definition: Actor.h:231
RoR::Actor::ar_left_mirror_angle
float ar_left_mirror_angle
Sim state; rear view mirror angle.
Definition: Actor.h:416
RoR::Actor::m_rotation_request_center
Ogre::Vector3 m_rotation_request_center
Definition: Actor.h:450
RoR::Actor::updateFlareStates
void updateFlareStates(float dt)
Definition: Actor.cpp:3024
RoR::Actor::CalcEventBoxes
void CalcEventBoxes()
Definition: ActorForcesEuler.cpp:1638
RoR::Actor::setBlinkType
void setBlinkType(BlinkType blink)
Definition: Actor.cpp:3093
RoR::Actor::CalcReplay
void CalcReplay()
Definition: ActorForcesEuler.cpp:1091
RoR::TyrePressure
Land vehicle feat Simulates tyre pressurization by adjusting springness of in-wheel beams.
Definition: TyrePressure.h:41
RoR::collcab_rate_t
Definition: SimData.h:403
RoR::Actor::tc_nodash
bool tc_nodash
Traction control attribute; Hide the dashboard indicator?
Definition: Actor.h:360
RoR::Actor::ar_right_mirror_angle
float ar_right_mirror_angle
Sim state; rear view mirror angle.
Definition: Actor.h:417
RoR::ActorSpawner
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
Definition: ActorSpawner.h:70
RoR::Actor::m_net_wheel_buf_size
size_t m_net_wheel_buf_size
For incoming/outgoing traffic; calculated on spawn.
Definition: Actor.h:603
RoR::Actor::CalcFuseDrag
void CalcFuseDrag()
Definition: ActorForcesEuler.cpp:125
RoR::ActorSpawnRequest
Definition: SimData.h:832
RoR::Actor::ar_wheel_speed
float ar_wheel_speed
Physics state; wheel speed in m/s.
Definition: Actor.h:400
RoR::Actor::requestAngleSnap
void requestAngleSnap(int division)
Definition: Actor.h:104
RoR::Actor::SoftReset
void SoftReset()
Definition: Actor.cpp:1573
RoR::Actor::ar_num_contacters
int ar_num_contacters
Total number of nodes which can selfcontact cabs.
Definition: Actor.h:322
RoR::Actor::m_fusealge_airfoil
Airfoil * m_fusealge_airfoil
Physics attr; defined in truckfile.
Definition: Actor.h:577
RoR::Actor::m_flexbody_tasks
std::vector< std::shared_ptr< Task > > m_flexbody_tasks
Gfx state.
Definition: Actor.h:535
RoR::Actor::ar_num_soundsources
int ar_num_soundsources
Definition: Actor.h:328
RoR::Actor::tc_pulse_state
bool tc_pulse_state
Traction control state;.
Definition: Actor.h:359
RoR::Actor::m_has_command_beams
bool m_has_command_beams
Physics attr;.
Definition: Actor.h:627
RoR::Actor::m_camera_local_gforces_max
Ogre::Vector3 m_camera_local_gforces_max
Physics state (camera local)
Definition: Actor.h:566
RoR::Actor::ar_posnode_spawn_height
float ar_posnode_spawn_height
Definition: Actor.h:396
RoR::Skidmark
Definition: Skidmark.h:58
RoR::Actor::getMaxGForces
Ogre::Vector3 getMaxGForces()
Definition: Actor.h:114
RoR::ActorManager
Builds and manages softbody actors (physics on background thread, networking)
Definition: ActorManager.h:43
RoR::Actor::getReplay
Replay * getReplay()
Definition: Actor.cpp:4566
RoR::Actor::Actor
Actor(ActorInstanceID_t actor_id, unsigned int vector_index, RigDef::DocumentPtr def, ActorSpawnRequest rq)
Definition: Actor.cpp:4394
RoR::Actor::m_net_initialized
bool m_net_initialized
Definition: Actor.h:624
RoR::Actor::m_disable_default_sounds
bool m_disable_default_sounds
Spawner context; TODO: remove.
Definition: Actor.h:633
RoR::TransferCase
Definition: Differentials.h:43
RoR::Actor::CalcBeams
void CalcBeams(bool trigger_hooks)
Definition: ActorForcesEuler.cpp:1140
RoR::beam_t
Simulation: An edge in the softbody structure.
Definition: SimData.h:330
RoR::Actor::ar_aeroengines
AeroEngine * ar_aeroengines[MAX_AEROENGINES]
Definition: Actor.h:329
RoR::Actor::getAvgPropedWheelRadius
float getAvgPropedWheelRadius()
Definition: Actor.h:257
RoR::Actor::isPreloadedWithTerrain
bool isPreloadedWithTerrain() const
Definition: Actor.h:238
RoR::Actor::CalcShocks3
void CalcShocks3(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
Definition: Actor.cpp:2632
RoR::Actor::ar_nodes_id
int * ar_nodes_id
Number in truck file, -1 for nodes generated by wheels/cinecam.
Definition: Actor.h:280
RoR::Actor::ar_screwprops
Screwprop * ar_screwprops[MAX_SCREWPROPS]
Definition: Actor.h:331
RoR::ActorInstanceID_t
int ActorInstanceID_t
Unique sequentially generated ID of an actor in session. Use ActorManager::GetActorById()
Definition: ForwardDeclarations.h:37
DEFAULT_COLLISION_RANGE
static const float DEFAULT_COLLISION_RANGE
Definition: SimConstants.h:53
RoR::Actor::ar_beams
beam_t * ar_beams
Definition: Actor.h:287
CmdKeyInertia.h
RoR::Actor::getVelocity
Ogre::Vector3 getVelocity() const
Definition: Actor.h:107
RoR::Actor::m_stabilizer_shock_request
int m_stabilizer_shock_request
Physics state; values: { -1, 0, 1 }.
Definition: Actor.h:568
RoR::Actor::authors
std::vector< authorinfo_t > authors
Definition: Actor.h:297
RoR::Actor::ar_nb_beams_d_interval
std::pair< float, float > ar_nb_beams_d_interval
Search interval for springiness & damping of regular beams.
Definition: Actor.h:465
RoR::Actor::reset
void reset(bool keep_position=false)
call this one to reset a truck from any context
Definition: Actor.cpp:1562
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:52
RoR::Actor::ar_num_aeroengines
int ar_num_aeroengines
Definition: Actor.h:330
RoR::Actor::getMinHeight
float getMinHeight(bool skip_virtual_nodes=true)
Definition: Actor.cpp:1508
RoR::Actor::removeWorkingTuneupDef
void removeWorkingTuneupDef()
Deletes the working tuneup def object if it exists.
Definition: Actor.cpp:4738
RoR::Actor::ar_rotators
rotator_t * ar_rotators
Definition: Actor.h:293
RoR::Actor::m_mouse_grab_move_force
float m_mouse_grab_move_force
Definition: Actor.h:560
RoR::Actor::ar_airbrake_intensity
int ar_airbrake_intensity
Physics state; values 0-5.
Definition: Actor.h:427
RoR::Actor::m_fusealge_front
node_t * m_fusealge_front
Physics attr; defined in truckfile.
Definition: Actor.h:578
RoR::Actor::ar_camera_node_roll
NodeNum_t ar_camera_node_roll[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; left node.
Definition: Actor.h:393
RoR::Actor::m_transfer_case
TransferCase * m_transfer_case
Physics.
Definition: Actor.h:573
RoR::Actor::ar_flares
std::vector< flare_t > ar_flares
Definition: Actor.h:303
RoR::Actor::m_previous_gear
int m_previous_gear
Sim state; land vehicle shifting.
Definition: Actor.h:575
RoR::Actor::tc_notoggle
bool tc_notoggle
Traction control attribute; Disable in-game toggle?
Definition: Actor.h:361
RoR::Actor::m_antilockbrake
bool m_antilockbrake
GUI state.
Definition: Actor.h:592
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::Actor::ar_num_wings
int ar_num_wings
Definition: Actor.h:296
RoR::ExtCameraMode
ExtCameraMode
Definition: SimData.h:57
RoR::Actor::getAuthors
std::vector< authorinfo_t > getAuthors()
Definition: Actor.cpp:4463
RoR::Actor::m_force_sensors
struct RoR::Actor::VehicleForceSensors m_force_sensors
Data for ForceFeedback devices.
RoR::Actor::m_slidenodes_locked
bool m_slidenodes_locked
Physics state; Are SlideNodes locked?
Definition: Actor.h:623
RoR::Actor::m_num_command_beams
int m_num_command_beams
TODO: Remove! Spawner context only; likely unused feature.
Definition: Actor.h:583
RoR::Actor::HandleInputEvents
void HandleInputEvents(float dt)
Definition: Actor.cpp:1896
RoR::Actor::ar_intra_collcabrate
collcab_rate_t ar_intra_collcabrate[MAX_CABS]
Definition: Actor.h:338
RoR::Actor::AddInterActorBeam
void AddInterActorBeam(beam_t *beam, ActorPtr other, ActorLinkingRequestType type)
Do not call directly - use MSG_SIM_ACTOR_LINKING_REQUESTED
Definition: Actor.cpp:3322
RoR::Actor::resetSlideNodePositions
void resetSlideNodePositions()
Recalculate SlideNode positions.
Definition: ActorSlideNode.cpp:112
RoR::Actor::NetUpdate::veh_state
std::vector< char > veh_state
Actor properties (engine, brakes, lights, ...)
Definition: Actor.h:654
RoR::Actor::ar_scale
float ar_scale
Physics state; scale of the actor (nominal = 1.0)
Definition: Actor.h:398
RoR::ActorPtrVec
std::vector< ActorPtr > ActorPtrVec
Definition: ForwardDeclarations.h:210
RoR::Actor::toggleHeadlights
void toggleHeadlights()
Definition: Actor.cpp:2994
RoR::Actor::VehicleForceSensors
Definition: Actor.h:636
RoR::Actor::DisjoinInterActorBeams
void DisjoinInterActorBeams()
Helper for MSG_ handlers, do not invoke by hand.
Definition: Actor.cpp:3410
RoR::Actor::calcNetwork
void calcNetwork()
Definition: Actor.cpp:525
RoR::Actor::cc_target_speed
float cc_target_speed
Cruise Control.
Definition: Actor.h:367
RoR::Actor::ar_nb_shocks_d_interval
std::pair< float, float > ar_nb_shocks_d_interval
Search interval for springiness & damping of shock beams.
Definition: Actor.h:467
RoR::Actor::Intersects
bool Intersects(ActorPtr actor, Ogre::Vector3 offset=Ogre::Vector3::ZERO)
Slow intersection test.
Definition: Actor.cpp:890
RoR::Actor::getTransferCaseMode
TransferCase * getTransferCaseMode()
Toggles between 2WD and 4WD mode.
Definition: Actor.h:159
RoR::Actor::ar_num_collcabs
int ar_num_collcabs
Definition: Actor.h:339
RoR::Actor::resolveCollisions
void resolveCollisions(Ogre::Vector3 direction)
Moves the actor at most 'direction.length()' meters towards 'direction' to resolve any collisions.
Definition: Actor.cpp:1072
RoRnet::LIGHTMASK_HEADLIGHT
@ LIGHTMASK_HEADLIGHT
Definition: RoRnet.h:114
RoR::Autopilot
Definition: AutoPilot.h:34
RoR::Actor::ar_num_custom_particles
int ar_num_custom_particles
Definition: Actor.h:326
RoR::Actor::m_avg_node_velocity
Ogre::Vector3 m_avg_node_velocity
average node velocity (compared to the previous frame step)
Definition: Actor.h:554
RoR::ACTORINSTANCEID_INVALID
static const ActorInstanceID_t ACTORINSTANCEID_INVALID
Definition: ForwardDeclarations.h:38
MAX_CPARTICLES
static const int MAX_CPARTICLES
maximum number of custom particles per actor
Definition: SimConstants.h:33
RoR::Actor::m_inter_point_col_detector
PointColDetector * m_inter_point_col_detector
Physics.
Definition: Actor.h:548
RoR::Actor::getTyrePressure
TyrePressure & getTyrePressure()
Definition: Actor.h:220
RoR::Actor::m_camera_local_gforces_cur
Ogre::Vector3 m_camera_local_gforces_cur
Physics state (camera local)
Definition: Actor.h:565
RoR::Actor::RemoveInterActorBeam
void RemoveInterActorBeam(beam_t *beam, ActorLinkingRequestType type)
Do not call directly - use MSG_SIM_ACTOR_LINKING_REQUESTED
Definition: Actor.cpp:3363
RoR::Replay
Definition: Replay.h:39
RoR::Actor::requestRotation
void requestRotation(float rotation, Ogre::Vector3 center)
Definition: Actor.h:103
RoR::Actor::ar_nb_beams_k_interval
std::pair< float, float > ar_nb_beams_k_interval
Search interval for springiness & damping of regular beams.
Definition: Actor.h:466
RoR::Actor::getSectionConfig
Ogre::String getSectionConfig()
Definition: Actor.h:230
RoR::Actor::updateVisual
void updateVisual(float dt=0)
Definition: Actor.cpp:3215
RoR::hydrobeam_t
Definition: SimData.h:588
RoR::Actor::ar_origin
Ogre::Vector3 ar_origin
Physics state; base position for softbody nodes.
Definition: Actor.h:385
RoR::Actor::calculateCollisionOffset
Ogre::Vector3 calculateCollisionOffset(Ogre::Vector3 direction)
Virtually moves the actor at most 'direction.length()' meters towards 'direction' trying to resolve a...
Definition: Actor.cpp:956
RoR::Actor::setFogLightsVisible
void setFogLightsVisible(bool val)
Definition: Actor.h:192
MAX_CAMERAS
static const int MAX_CAMERAS
maximum number of cameras per actor
Definition: SimConstants.h:29
RoR::Actor::SyncReset
void SyncReset(bool reset_position)
this one should be called only synchronously (without physics running in background)
Definition: Actor.cpp:1597
RoR::ActorLinkingRequestType
ActorLinkingRequestType
Definition: SimData.h:894
RoR::Actor::antilockbrakeToggle
void antilockbrakeToggle()
Definition: Actor.cpp:3782
RoR::Actor::ar_hydro_speed_coupling
bool ar_hydro_speed_coupling
Definition: Actor.h:476
RoR::Actor::getHeadlightsVisible
bool getHeadlightsVisible() const
Definition: Actor.h:187
RoR::Actor::ar_command_key
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
Definition: Actor.h:305
RoR::Actor::getTruckFileName
std::string getTruckFileName()
Definition: Actor.h:227
RoR::Actor::updateSlideNodePositions
void updateSlideNodePositions()
incrementally update the position of all SlideNodes
Definition: ActorSlideNode.cpp:130
RoR::Actor::getPosition
Ogre::Vector3 getPosition()
Definition: Actor.cpp:424
RoR::Actor::scaleTruck
void scaleTruck(float value)
Definition: Actor.cpp:369
RoR::Actor::m_description
std::vector< std::string > m_description
Definition: Actor.h:597
RoR::Actor::hookToggle
void hookToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::HOOK_TOGGLE, NodeNum_t mousenode=NODENUM_INVALID, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3629
RoR::Actor::NotifyActorCameraChanged
void NotifyActorCameraChanged()
Logic: sound, display; Notify this vehicle that camera changed;.
Definition: Actor.cpp:3844
RoR::Actor::ar_hydro_rudder_command
float ar_hydro_rudder_command
Definition: Actor.h:408
RoR::Actor::ForceFeedbackStep
void ForceFeedbackStep(int steps)
Definition: Actor.cpp:1784
RoR::Actor::getBrakeLightVisible
bool getBrakeLightVisible() const
Definition: Actor.h:177
RoR::Actor::WriteDiagnosticDump
void WriteDiagnosticDump(std::string const &filename)
Definition: Actor.cpp:4629
RefCountingObject.h
RoR::Actor::ar_collcabs
int ar_collcabs[MAX_CABS]
Definition: Actor.h:336
RoR::Actor::getVehicleAI
VehicleAIPtr getVehicleAI()
Definition: Actor.h:215
RoR::Actor::ar_inter_beams
std::vector< beam_t * > ar_inter_beams
Beams connecting 2 actors.
Definition: Actor.h:289
RoR::Actor::ar_hydro_aileron_state
float ar_hydro_aileron_state
Definition: Actor.h:407
RoR::Actor::ar_cabs
int ar_cabs[MAX_CABS *3]
Definition: Actor.h:333
RoR::Actor::ar_import_commands
bool ar_import_commands
Sim state.
Definition: Actor.h:481
RoR::Actor::ar_minimass
std::vector< float > ar_minimass
minimum node mass in Kg
Definition: Actor.h:284
RoR::Actor::ar_exhaust_dir_node
NodeNum_t ar_exhaust_dir_node
Old-format exhaust (one per vehicle) backwards direction node.
Definition: Actor.h:375
RoR::Actor::cc_accs
std::deque< float > cc_accs
Cruise Control.
Definition: Actor.h:369
Application.h
Central state/object manager and communications hub.
RoR::Actor::m_net_propanimkey_buf_size
size_t m_net_propanimkey_buf_size
For incoming/outgoing traffic; calculated on spawn.
Definition: Actor.h:604
RoR::OutGauge
Definition: OutGauge.h:45
RoR::Actor::getOrientation
Ogre::Quaternion getOrientation()
Definition: Actor.cpp:429
RoR::Actor::setMass
void setMass(float m)
Definition: Actor.cpp:4473
RoR::Actor::m_net_color_num
int m_net_color_num
Definition: Actor.h:610
RoR::PointColDetector
Definition: PointColDetector.h:32
RoR::Actor::isTied
bool isTied()
Definition: Actor.cpp:3875
SoundScriptManager.h
RoR::node_t
Physics: A vertex in the softbody structure.
Definition: SimData.h:286
RoR::Actor::ar_rescuer_flag
bool ar_rescuer_flag
Gameplay attr; defined in truckfile. TODO: Does anybody use this anymore?
Definition: Actor.h:479
RoR::Actor::m_deletion_entities
std::vector< Ogre::Entity * > m_deletion_entities
For unloading vehicle; filled at spawn.
Definition: Actor.h:542
RoR::Actor::ar_initial_beam_defaults
std::vector< std::pair< float, float > > ar_initial_beam_defaults
Definition: Actor.h:312
RoR::Actor::UpdateCruiseControl
void UpdateCruiseControl(float dt)
Defined in 'gameplay/CruiseControl.cpp'.
Definition: CruiseControl.cpp:48
RoR::Actor::m_active_eventboxes
std::vector< std::pair< collision_box_t *, NodeNum_t > > m_active_eventboxes
Definition: Actor.h:438
RoR::Actor::m_used_actor_entry
CacheEntryPtr m_used_actor_entry
Definition: Actor.h:588
RoR::Actor::~Actor
virtual ~Actor() override
Definition: Actor.cpp:82
RoR::Actor::NetUpdate::node_data
std::vector< char > node_data
Compressed node positions.
Definition: Actor.h:655
RoR::Actor::tc_timer
float tc_timer
Traction control state;.
Definition: Actor.h:362
RoR::Actor::m_lightmask
BitMask_t m_lightmask
RoRnet::Lightmask.
Definition: Actor.h:616
RoR::Actor::ar_autopilot
Autopilot * ar_autopilot
Definition: Actor.h:382
RoR::Actor::getSideLightsVisible
bool getSideLightsVisible() const
Definition: Actor.h:185
RoR::Actor::m_dry_mass
float m_dry_mass
Physics attr;.
Definition: Actor.h:586
RoR::PerVehicleCameraContext
Definition: PerVehicleCameraContext.h:13
RoR::Actor::m_prop_anim_key_states
std::vector< PropAnimKeyState > m_prop_anim_key_states
Definition: Actor.h:598
RoR::Actor::ar_initial_total_mass
float ar_initial_total_mass
Definition: Actor.h:309
RoR::Actor::ar_sleep_counter
float ar_sleep_counter
Sim state; idle time counter.
Definition: Actor.h:412
RoR::Actor::getSteeringAngle
float getSteeringAngle()
Definition: Actor.cpp:4458
RoR::Actor::m_spawn_rotation
float m_spawn_rotation
Definition: Actor.h:561
RoR::Actor::getHeightAboveGroundBelow
float getHeightAboveGroundBelow(float height, bool skip_virtual_nodes=true)
Definition: Actor.cpp:1548
RoR::Actor::ar_num_screwprops
int ar_num_screwprops
Definition: Actor.h:332
RoR::BlinkType
BlinkType
< Turn signal
Definition: SimData.h:121
RoR::Actor::getDirection
Ogre::Vector3 getDirection()
average actor velocity, calculated using the actor positions of the last two frames
Definition: Actor.cpp:419
RoR::Actor::ar_camera_node_roll_inv
bool ar_camera_node_roll_inv[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; indicates roll node is right instead of left.
Definition: Actor.h:394
RoR::Actor::GetFFbBodyForces
Ogre::Vector3 GetFFbBodyForces() const
Definition: Actor.h:268
RoR::Actor::getShockCount
int getShockCount()
Definition: Actor.h:106
RoR::Actor::m_mouse_grab_node
NodeNum_t m_mouse_grab_node
Sim state; node currently being dragged by user.
Definition: Actor.h:558
RoR::Actor::m_flares_mode
GfxFlaresMode m_flares_mode
Snapshot of cvar 'gfx_flares_mode' on spawn.
Definition: Actor.h:615
RoR::Actor::ar_nodes_name_top_length
int ar_nodes_name_top_length
For nicely formatted diagnostic output.
Definition: Actor.h:282
RoR::Actor::updateSkidmarks
void updateSkidmarks()
Creates or updates skidmarks.
Definition: Actor.cpp:2931
RoR::Actor::ar_wheel_spin
float ar_wheel_spin
Physics state; wheel speed in radians/s.
Definition: Actor.h:401
RoRnet::LIGHTMASK_BRAKES
@ LIGHTMASK_BRAKES
brake lights on
Definition: RoRnet.h:118
RoR::Actor::m_railgroups
std::vector< RailGroup * > m_railgroups
all the available RailGroups for this actor
Definition: Actor.h:541
RoR::Actor::ar_num_beams
int ar_num_beams
Definition: Actor.h:288
RoR::Actor::m_avionic_chatter_timer
float m_avionic_chatter_timer
Sound fx state (some pseudo random number, doesn't matter)
Definition: Actor.h:547
RoR::ActorState
ActorState
Definition: SimData.h:265
RoR::Actor::m_preloaded_with_terrain
bool m_preloaded_with_terrain
Spawn context (TODO: remove!)
Definition: Actor.h:629
RoR::Actor::m_replay_handler
Replay * m_replay_handler
Definition: Actor.h:556
RoR::Actor::getTotalMass
float getTotalMass(bool withLocked=true)
Definition: Actor.cpp:807
RoR::Actor::m_water_contact_old
bool m_water_contact_old
Scripting state.
Definition: Actor.h:626
RoR::Actor::m_net_total_buffer_size
size_t m_net_total_buffer_size
For incoming/outgoing traffic; calculated on spawn.
Definition: Actor.h:605
RoR::Actor::getUsedActorEntry
CacheEntryPtr & getUsedActorEntry()
The actor entry itself.
Definition: Actor.cpp:4714
RoR::cparticle_t
Definition: SimData.h:648
RoR::Actor::m_tyre_pressure
TyrePressure m_tyre_pressure
Definition: Actor.h:596
RoR::Actor::toggleSlideNodeLock
void toggleSlideNodeLock()
Definition: ActorSlideNode.cpp:34
RoR::Actor::tc_mode
bool tc_mode
Traction control state; Enabled? {1/0}.
Definition: Actor.h:357
RoR::Actor::ar_hydro_elevator_state
float ar_hydro_elevator_state
Definition: Actor.h:411
RoR::Actor::RecalculateNodeMasses
void RecalculateNodeMasses(Ogre::Real total)
Previously 'calc_masses2()'.
Definition: Actor.cpp:715
RoRnet::LIGHTMASK_HIGHBEAMS
@ LIGHTMASK_HIGHBEAMS
Definition: RoRnet.h:115
RoR::Actor::ar_num_cinecams
int ar_num_cinecams
Sim attr;.
Definition: Actor.h:381
RoR::Actor::ar_collision_range
float ar_collision_range
Physics attr.
Definition: Actor.h:434
RoR::Actor::GetCameraContext
PerVehicleCameraContext * GetCameraContext()
Definition: Actor.h:265
RoR::Actor::getManagedMaterialNames
std::vector< std::string > getManagedMaterialNames()
Definition: Actor.cpp:4583
RoR::Actor::ar_nb_wheels_k_interval
std::pair< float, float > ar_nb_wheels_k_interval
Search interval for springiness & damping of wheel / rim beams.
Definition: Actor.h:470
RoR::ExtCameraMode::CLASSIC
@ CLASSIC
RoR::Actor::m_tractioncontrol
bool m_tractioncontrol
GUI state.
Definition: Actor.h:593
RoR::Actor::m_disable_smoke
bool m_disable_smoke
Stops/starts smoke particles (i.e. exhausts, turbojets).
Definition: Actor.h:634
RoR::Actor::GetCameraRoll
Ogre::Vector3 GetCameraRoll()
Definition: Actor.h:267
RoR::Actor::ar_node_to_node_connections
std::vector< std::vector< int > > ar_node_to_node_connections
Definition: Actor.h:314
RoR::Actor::toggleTransferCaseMode
void toggleTransferCaseMode()
Definition: Actor.cpp:1431
RoR::Actor::parkingbrakeToggle
void parkingbrakeToggle()
Definition: Actor.cpp:3767
RoR::Actor::ar_nb_mass_scale
float ar_nb_mass_scale
Global mass scale (affects all nodes the same way)
Definition: Actor.h:461
RoR::Actor::m_total_mass
float m_total_mass
Physics state; total mass in Kg.
Definition: Actor.h:557
RoR::Actor::CalcForcesEulerPrepare
bool CalcForcesEulerPrepare(bool doUpdate)
Definition: ActorForcesEuler.cpp:1099
MAX_CAMERARAIL
static const int MAX_CAMERARAIL
maximum number of camera rail points
Definition: SimConstants.h:34
RoR::Actor::getParkingBrake
bool getParkingBrake()
Definition: Actor.h:150
RoR::Actor::m_net_node_buf_size
size_t m_net_node_buf_size
For incoming/outgoing traffic; calculated on spawn.
Definition: Actor.h:602
RoR::Actor::ar_brake_force
float ar_brake_force
Physics attr; filled at spawn.
Definition: Actor.h:383
RoR::Actor::ar_is_police
bool ar_is_police
Gfx/sfx attr.
Definition: Actor.h:478
RoR::Actor::cc_can_brake
bool cc_can_brake
Cruise Control.
Definition: Actor.h:365
RoR::Actor::alb_timer
float alb_timer
Anti-lock brake state;.
Definition: Actor.h:355
RoR::Actor::alb_mode
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
Definition: Actor.h:350
RoR::Actor::setBeaconMode
void setBeaconMode(bool val)
Definition: Actor.h:193
RoR::Actor::ar_initial_node_positions
std::vector< Ogre::Vector3 > ar_initial_node_positions
Definition: Actor.h:311
RoR::Actor::m_num_proped_wheels
int m_num_proped_wheels
Physics attr, filled at spawn - Number of propelled wheels.
Definition: Actor.h:545
RoR::Actor::ar_elevator
float ar_elevator
Sim state; aerial controller.
Definition: Actor.h:418
RoR::Actor::ar_nb_initialized
bool ar_nb_initialized
Definition: Actor.h:456
RoR::DashBoardManager
Definition: DashBoardManager.h:205
RoR::Actor::ar_nb_wheels_d_interval
std::pair< float, float > ar_nb_wheels_d_interval
Search interval for springiness & damping of wheel / rim beams.
Definition: Actor.h:469
RoR::Actor::ar_nodes
node_t * ar_nodes
Definition: Actor.h:279
RoR::Actor::m_has_axles_section
bool m_has_axles_section
Temporary (legacy parsing helper) until central diffs are implemented.
Definition: Actor.h:595
RoR::Actor::getMinimalCameraRadius
Ogre::Real getMinimalCameraRadius()
Definition: Actor.cpp:4561
RoR::Actor::ar_toggle_ties
bool ar_toggle_ties
Sim state.
Definition: Actor.h:483
RoR::Actor::getRotation
float getRotation()
Definition: Actor.cpp:409
RoR::Actor::toggleBlinkType
void toggleBlinkType(BlinkType blink)
Definition: Actor.cpp:3085
RoR::Actor::m_used_skin_entry
CacheEntryPtr m_used_skin_entry
Graphics.
Definition: Actor.h:589
RoR::GfxFlaresMode
GfxFlaresMode
Definition: Application.h:238
RoR::Actor::ar_hydro_aileron_command
float ar_hydro_aileron_command
Definition: Actor.h:406
RoR::Actor::m_potential_eventboxes
CollisionBoxPtrVec m_potential_eventboxes
Definition: Actor.h:437
MAX_SOUNDSCRIPTS_PER_TRUCK
static const int MAX_SOUNDSCRIPTS_PER_TRUCK
maximum number of soundsscripts per actor
Definition: SimConstants.h:32
RoR::Actor::CalcDifferentials
void CalcDifferentials()
Definition: ActorForcesEuler.cpp:163
RoR::Actor::ar_hydro_dir_command
float ar_hydro_dir_command
Definition: Actor.h:403
RoR::Actor::ar_driveable
ActorType ar_driveable
Sim attr; marks vehicle type and features.
Definition: Actor.h:378
RoR::Actor::getTransferCaseName
Ogre::String getTransferCaseName()
Toggles between Hi and Lo mode.
Definition: Actor.cpp:1476
RoR::Actor::setSmokeEnabled
void setSmokeEnabled(bool enabled)
Writes info to console/notify area.
Definition: Actor.h:163
RoR::Actor::ar_initial_node_masses
std::vector< float > ar_initial_node_masses
Definition: Actor.h:310
RoR::Screwprop
Definition: ScrewProp.h:34
RoR::Actor::ar_exhaust_pos_node
NodeNum_t ar_exhaust_pos_node
Old-format exhaust (one per vehicle) emitter node.
Definition: Actor.h:374
RoR::Actor::getNodePosition
Ogre::Vector3 getNodePosition(int nodeNumber)
Returns world position of node.
Definition: Actor.cpp:4593
RoR::Actor::m_axle_diffs
Differential * m_axle_diffs[1+MAX_WHEELS/2]
Physics.
Definition: Actor.h:569
RoR::Actor::ar_nb_beams_scale
std::pair< float, float > ar_nb_beams_scale
Scales for springiness & damping of regular beams.
Definition: Actor.h:462
RoR::Actor::UpdatePropAnimInputEvents
void UpdatePropAnimInputEvents()
Definition: Actor.cpp:4687
RoR::Actor::getUsedSkinEntry
CacheEntryPtr & getUsedSkinEntry()
Definition: Actor.cpp:4719
RoR::Actor::getHighBeamsVisible
bool getHighBeamsVisible() const
Definition: Actor.h:189
RoR::Actor::alb_nodash
bool alb_nodash
Anti-lock brake attribute: Hide the dashboard indicator?
Definition: Actor.h:353
RoR::Actor::m_intra_point_col_detector
PointColDetector * m_intra_point_col_detector
Physics.
Definition: Actor.h:549
RoR::Actor::dispose
void dispose()
Effectively destroys the object but keeps it in memory to satisfy shared pointers.
Definition: Actor.cpp:89
RoR::Actor::m_odometer_total
float m_odometer_total
GUI state.
Definition: Actor.h:581
RoR::Actor::alb_minspeed
float alb_minspeed
Anti-lock brake attribute;.
Definition: Actor.h:349
RoR::Actor::ar_custom_camera_node
NodeNum_t ar_custom_camera_node
Sim state; custom tracking node for 3rd-person camera.
Definition: Actor.h:424
RoR::Actor::tieToggle
void tieToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::TIE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3435
RoR::Actor::ar_ropes
std::vector< rope_t > ar_ropes
Definition: Actor.h:299
RoR::Actor::ar_num_cameras
int ar_num_cameras
Definition: Actor.h:386
RoR::Actor::resetSlideNodes
void resetSlideNodes()
Reset all the SlideNodes.
Definition: ActorSlideNode.cpp:122
RoR::Actor::ropeToggle
void ropeToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::ROPE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3552
RoR::Actor::ar_hydro_elevator_command
float ar_hydro_elevator_command
Definition: Actor.h:410
RoR::Actor::m_net_username
Ogre::UTFString m_net_username
Definition: Actor.h:609
RoR::Actor::m_working_tuneup_def
TuneupDefPtr m_working_tuneup_def
Each actor gets unique instance, even if loaded from .tuneup file in modcache.
Definition: Actor.h:590
RoR::Actor::CalcBuoyance
void CalcBuoyance(bool doUpdate)
Definition: ActorForcesEuler.cpp:151
RoR::Actor::ar_wings
wing_t * ar_wings
Definition: Actor.h:295
RoR::GfxFlaresMode::NONE
@ NONE
None (fastest)
RoR::Actor::getRotationCenter
Ogre::Vector3 getRotationCenter()
Definition: Actor.cpp:1490
RoR::Actor::requestTranslation
void requestTranslation(Ogre::Vector3 translation)
Definition: Actor.h:105
RoR::Actor::toggleTransferCaseGearRatio
void toggleTransferCaseGearRatio()
Definition: Actor.cpp:1462
RoR::Actor::CalcAircraftForces
void CalcAircraftForces(bool doUpdate)
Definition: ActorForcesEuler.cpp:103
RoR::Actor::alb_ratio
float alb_ratio
Anti-lock brake attribute: Regulating force.
Definition: Actor.h:348
RoR::Actor::ar_anim_shift_timer
float ar_anim_shift_timer
For 'animator' with flag 'shifter'.
Definition: Actor.h:363
RoR::Actor::ar_num_wheels
int ar_num_wheels
Definition: Actor.h:324
RoR::ground_model_t
Surface friction properties.
Definition: SimData.h:739
RefCountingObjectPtr.h
RoR::Actor::getTruckType
int getTruckType()
Definition: Actor.h:229
RoR::Actor::m_avg_node_position
Ogre::Vector3 m_avg_node_position
average node position
Definition: Actor.h:551
RoR::Actor::getShockVelocity
float getShockVelocity(int shock_number)
Definition: Actor.cpp:4761
RoR::Actor::ar_top_speed
float ar_top_speed
Sim state.
Definition: Actor.h:435
RoR::Actor::GetNumActiveConnectedBeams
int GetNumActiveConnectedBeams(int nodeid)
Returns the number of active (non bounded) beams connected to a node.
Definition: Actor.cpp:3864
RoR::Actor::ar_predicted_coll_bounding_boxes
std::vector< Ogre::AxisAlignedBox > ar_predicted_coll_bounding_boxes
Definition: Actor.h:317
RoR::Actor::setCustomLightVisible
void setCustomLightVisible(int number, bool visible)
Definition: Actor.cpp:4500
RoR::Actor::ar_num_camera_rails
int ar_num_camera_rails
Definition: Actor.h:344
RoR::Actor::updateSlideNodeForces
void updateSlideNodeForces(const Ogre::Real delta_time_sec)
calculate and apply Corrective forces
Definition: ActorSlideNode.cpp:103
MAX_CABS
static const int MAX_CABS
maximum number of cabs per actor
Definition: SimConstants.h:27
RoR::Actor::ar_net_stream_id
int ar_net_stream_id
Definition: Actor.h:429
RoR::Actor::ar_submesh_ground_model
ground_model_t * ar_submesh_ground_model
Definition: Actor.h:413
RoR::Actor::VehicleForceSensors::accu_hydros_forces
float accu_hydros_forces
Definition: Actor.h:647
RoR::Airfoil
Represents an airfoil http://en.wikipedia.org/wiki/Airfoil.
Definition: Airfoil.h:31
RoR::GfxActor
Definition: GfxActor.h:52
BitMask_t
uint32_t BitMask_t
Definition: BitFlags.h:7
GfxActor.h
Manager for all visuals belonging to a single actor.
RoR::Actor::getMaxHeight
float getMaxHeight(bool skip_virtual_nodes=true)
Definition: Actor.cpp:1521
RoR::Actor::ar_design_name
Ogre::String ar_design_name
Name of the vehicle/machine/object this actor represents.
Definition: Actor.h:346
RoR::Actor::m_wheel_node_count
int m_wheel_node_count
Static attr; filled at spawn.
Definition: Actor.h:574
RoR::Actor::countFlaresByType
int countFlaresByType(FlareType type)
Definition: Actor.cpp:4537
RoR::Actor::alb_notoggle
bool alb_notoggle
Anti-lock brake attribute: Disable in-game toggle?
Definition: Actor.h:354
RoR::Actor::countCustomLights
int countCustomLights(int control_number)
Definition: Actor.cpp:4520
RoR::Actor::ar_net_last_update_time
unsigned long ar_net_last_update_time
Definition: Actor.h:432
RoR::Actor::ar_shocks
shock_t * ar_shocks
Shock absorbers.
Definition: Actor.h:290
RoR::Actor::ar_hydros
std::vector< hydrobeam_t > ar_hydros
Definition: Actor.h:335
RigDef::DocumentPtr
std::shared_ptr< Document > DocumentPtr
Definition: RigDef_Prerequisites.h:38
RoR::Actor::ar_nb_skip_steps
int ar_nb_skip_steps
Amount of physics steps to be skipped before measuring.
Definition: Actor.h:459
RoRnet::LIGHTMASK_BEACONS
@ LIGHTMASK_BEACONS
beacons on
Definition: RoRnet.h:120
MAX_WHEELS
static const int MAX_WHEELS
maximum number of wheels per actor
Definition: SimConstants.h:24
RoR::Actor::calculateAveragePosition
void calculateAveragePosition()
Definition: Actor.cpp:1130
RoR::Actor::getBlinkType
BlinkType getBlinkType()
Definition: Actor.cpp:4548
RoR::Actor::getTruckName
std::string getTruckName()
Definition: Actor.h:226
RefCountingObject
Self reference-counting objects, as requred by AngelScript garbage collector.
Definition: RefCountingObject.h:26
RoR::Actor::ar_wheels
wheel_t ar_wheels[MAX_WHEELS]
Definition: Actor.h:323
RoR::Actor::ar_filehash
std::string ar_filehash
Attribute; filled at spawn.
Definition: Actor.h:426
RoR::Actor::alb_pulse_state
bool alb_pulse_state
Anti-lock brake state;.
Definition: Actor.h:352
RoR::Actor::CalcHydros
void CalcHydros()
Definition: ActorForcesEuler.cpp:546
RoR::Actor::ar_camera_node_pos
NodeNum_t ar_camera_node_pos[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; origin node.
Definition: Actor.h:391
RoR::Actor::m_custom_particles_enabled
bool m_custom_particles_enabled
Gfx state.
Definition: Actor.h:628
RoR::Actor::ar_net_source_id
int ar_net_source_id
Unique ID of remote player who spawned this actor.
Definition: Actor.h:428
RoR::Actor::updateSoundSources
void updateSoundSources()
Definition: Actor.cpp:3198
RoR::ActorType
ActorType
< Aka 'Driveable'
Definition: SimData.h:88
RoR::Actor::CalcBeamsInterActor
void CalcBeamsInterActor()
Definition: ActorForcesEuler.cpp:1399
RoR::Actor::m_beam_break_debug_enabled
bool m_beam_break_debug_enabled
Logging state.
Definition: Actor.h:630
MAX_SCREWPROPS
static const int MAX_SCREWPROPS
maximum number of boat screws per actor
Definition: SimConstants.h:31
RoR::Actor::getGForces
Ogre::Vector3 getGForces()
Definition: Actor.h:86
RoR::Actor::CalcWheels
void CalcWheels(bool doUpdate, int num_steps)
Definition: ActorForcesEuler.cpp:262
RoR::Actor::displayWheelDiffMode
void displayWheelDiffMode()
Cycles through the available inter wheel diff modes.
Definition: Actor.cpp:1391
RoR::Actor::ar_aileron
float ar_aileron
Sim state; aerial controller.
Definition: Actor.h:420
RoR::Actor::ar_ropables
std::vector< ropable_t > ar_ropables
Definition: Actor.h:300
RoR::Actor::m_camera_gforces
Ogre::Vector3 m_camera_gforces
Physics state (global)
Definition: Actor.h:564
RoR::ActorLinkingRequestType::TIE_TOGGLE
@ TIE_TOGGLE
RoR::Actor::ar_state
ActorState ar_state
Definition: Actor.h:446
RoR::Actor::setAirbrakeIntensity
void setAirbrakeIntensity(float intensity)
Definition: Actor.cpp:2921
RoR::Actor::engineTriggerHelper
void engineTriggerHelper(int engineNumber, EngineTriggerType type, float triggerValue)
Definition: Actor.cpp:4360
RoR::Actor::m_handbrake_force
float m_handbrake_force
Physics attr; defined in truckfile.
Definition: Actor.h:576
RoR::Actor::getLightStateMask
BitMask_t getLightStateMask() const
Definition: Actor.h:183
RoR::Actor::ar_update_physics
bool ar_update_physics
Physics state; Should this actor be updated (locally) in the next physics step?
Definition: Actor.h:473
RoR::SlideNode
Definition: SlideNode.h:64
RoR::Actor::updateDashBoards
void updateDashBoards(float dt)
Definition: Actor.cpp:3891
RoR::Actor::prepareInside
void prepareInside(bool inside)
Prepares vehicle for in-cabin camera use.
Definition: Actor.cpp:2955
RoR::Actor::m_mouse_grab_pos
Ogre::Vector3 m_mouse_grab_pos
Definition: Actor.h:559
RoR::Actor::updateInitPosition
void updateInitPosition()
Definition: Actor.cpp:1249
RoR::Actor::ar_rudder
float ar_rudder
Sim state; aerial/marine controller.
Definition: Actor.h:419
RoR::Actor::m_rotation_request
float m_rotation_request
Accumulator.
Definition: Actor.h:451
RoR::Actor::getShockNode1
int getShockNode1(int shock_number)
Definition: Actor.cpp:4770
RoR::Actor::ar_airbrakes
std::vector< Airbrake * > ar_airbrakes
Definition: Actor.h:304
RoR::Actor::cruisecontrolToggle
void cruisecontrolToggle()
Defined in 'gameplay/CruiseControl.cpp'.
Definition: CruiseControl.cpp:31
RoR::Actor::ar_evboxes_bounding_box
Ogre::AxisAlignedBox ar_evboxes_bounding_box
bounding box around nodes eligible for eventbox triggering
Definition: Actor.h:307
RoR::Actor::ar_camera_rail
NodeNum_t ar_camera_rail[MAX_CAMERARAIL]
Nodes defining camera-movement spline.
Definition: Actor.h:343
RoR::Actor::getWorkingTuneupDef
TuneupDefPtr & getWorkingTuneupDef()
Definition: Actor.cpp:4724
RoR::Actor::ar_main_camera_node_roll
NodeNum_t ar_main_camera_node_roll
Sim attr; ar_camera_node_roll[0] >= 0 ? ar_camera_node_roll[0] : 0.
Definition: Actor.h:390
RoR::Actor::CalcHooks
void CalcHooks()
Definition: ActorForcesEuler.cpp:1717
RoR::Actor::ar_soundsources
soundsource_t ar_soundsources[MAX_SOUNDSCRIPTS_PER_TRUCK]
Definition: Actor.h:327
RoR::Actor::setSideLightsVisible
void setSideLightsVisible(bool val)
Definition: Actor.h:186
RoR::Actor::ar_num_shocks
int ar_num_shocks
Number of shock absorbers.
Definition: Actor.h:291
RoR::Actor::UpdateBoundingBoxes
void UpdateBoundingBoxes()
Definition: Actor.cpp:1165
RoR::Actor::ar_guisettings_use_engine_max_rpm
bool ar_guisettings_use_engine_max_rpm
Definition: Actor.h:441
RoR
Definition: AppContext.h:36
RoR::Actor::m_load_mass
float m_load_mass
Physics attr; predefined load mass in Kg.
Definition: Actor.h:584
RoR::Actor::m_beam_deform_debug_enabled
bool m_beam_deform_debug_enabled
Logging state.
Definition: Actor.h:631
RoR::Actor::m_gfx_actor
std::unique_ptr< GfxActor > m_gfx_actor
Definition: Actor.h:537
RoR::soundsource_t
Definition: SimData.h:411
RoR::Actor::ar_main_camera_dir_corr
Ogre::Quaternion ar_main_camera_dir_corr
Sim attr;.
Definition: Actor.h:387
RoR::Actor::m_anglesnap_request
int m_anglesnap_request
Accumulator.
Definition: Actor.h:452
RoR::Actor::ar_has_active_shocks
bool ar_has_active_shocks
Are there active stabilizer shocks?
Definition: Actor.h:292
RoR::Actor::CalcMouse
void CalcMouse()
Definition: ActorForcesEuler.cpp:94
RoR::Actor::m_camera_gforces_accu
Ogre::Vector3 m_camera_gforces_accu
Accumulator for 'camera' G-forces.
Definition: Actor.h:563
RoR::Actor::ar_guisettings_shifter_anim_time
float ar_guisettings_shifter_anim_time
Definition: Actor.h:443
RoR::Actor::ar_minimass_skip_loaded_nodes
bool ar_minimass_skip_loaded_nodes
Definition: Actor.h:285
RoR::Actor::ar_managed_materials
std::map< std::string, Ogre::MaterialPtr > ar_managed_materials
Definition: Actor.h:318
MAX_AEROENGINES
static const int MAX_AEROENGINES
maximum number of aero engines per actor
Definition: SimConstants.h:30
RoR::Actor::ar_num_buoycabs
int ar_num_buoycabs
Definition: Actor.h:342
RoR::EngineTriggerType
EngineTriggerType
Definition: SimData.h:219
RoR::Actor::ar_cinecam_node
NodeNum_t ar_cinecam_node[MAX_CAMERAS]
Sim attr; Cine-camera node indexes.
Definition: Actor.h:380
RoR::Actor::applyNodeBeamScales
void applyNodeBeamScales()
For GUI::NodeBeamUtils.
Definition: Actor.cpp:1754
RoR::wing_t
Definition: SimData.h:537
RoR::Actor::m_buoyance
std::unique_ptr< Buoyance > m_buoyance
Physics.
Definition: Actor.h:587
RoR::Actor::sendStreamData
void sendStreamData()
Send outgoing data.
Definition: Actor.cpp:1973
RoR::Actor::CalcShocks
void CalcShocks(bool doUpdate, int num_steps)
Definition: ActorForcesEuler.cpp:491
RoR::Actor::getCustomLightVisible
bool getCustomLightVisible(int number)
Definition: Actor.cpp:4478
RoR::Actor::VehicleForceSensors::accu_body_forces
Ogre::Vector3 accu_body_forces
Definition: Actor.h:644
RoR::Actor::ar_guisettings_speedo_max_kph
float ar_guisettings_speedo_max_kph
Definition: Actor.h:442
RoR::Actor::displayTransferCaseMode
void displayTransferCaseMode()
Gets the current transfer case mode name (4WD Hi, ...)
Definition: Actor.cpp:1417
RoR::rotator_t
Definition: SimData.h:599
RoR::Actor::m_blinker_left_lit
bool m_blinker_left_lit
Blinking state of left turn signal.
Definition: Actor.h:618
RoR::Actor::isBeingReset
bool isBeingReset() const
Definition: Actor.h:273
RoR::CmdKeyArray
For backwards compatibility of the 'triggers' feature, the commandkey array must support negative ind...
Definition: SimData.h:668
RoR::Actor::calcNodeConnectivityGraph
void calcNodeConnectivityGraph()
Definition: Actor.cpp:871
RoR::shock_t
Definition: SimData.h:368
RoR::Actor::VehicleForceSensors::Reset
void Reset()
Definition: Actor.h:638
RoR::Actor::VehicleForceSensors::out_body_forces
Ogre::Vector3 out_body_forces
Definition: Actor.h:648
RoR::Actor::ar_net_timer
Ogre::Timer ar_net_timer
Definition: Actor.h:431
RoR::Actor::muteAllSounds
void muteAllSounds()
Definition: Actor.cpp:3816
RoR::Actor::m_reset_timer
Ogre::Timer m_reset_timer
Definition: Actor.h:562