Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
BeamClass.h
Go to the documentation of this file.
1namespace Script2Game {
2
15{
16public:
17
20 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
21
23
27 vector3 getPosition();
28
33
37 float getRotation();
38
43
48
52 float getSpeed();
53
58 vector3 getGForces();
59
64 float getTotalMass(bool withLocked);
65
69 float getDryMass();
70
75
80
85
90
96 vector3 getNodePosition(int nodeNumber);
97
103 float getNodeInitialMass(int nodeNumber);
104
110 float getNodeMass(int nodeNumber);
111
117 vector3 getNodeVelocity(int nodeNumber);
118
124 vector3 getNodeForces(int nodeNumber);
125
133 void getNodeMassOptions(int nodeNumber, bool& loaded, bool& overrideMass);
134
140 bool isNodeWheelRim(int nodeNumber);
141
147 bool isNodeWheelTire(int nodeNumber);
148
153
158
164 void reset(bool keep_position);
165
170
175
177
180 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
181
185 void scaleTruck(float ratio);
186
191 void setMass(float m);
192
197 void setLoadedMass(float loadMass);
198
205 void setNodeMass(int nodeNumber, float mass);
206
214 void setNodeMassOptions(int nodeNumber, bool loaded, bool overrideMass);
215
220 void setSimAttribute(ActorSimAttr attr, float val);
221
223
228 void setIndexedSimAttribute(ActorSimAttr attr, float val, int index);
229
230 float getIndexedSimAttribute(ActorSimAttr attr, int index);
231
237
241 void setAirbrakeIntensity(float level);
242
246 void setAircraftFlaps(int level);
247
248 void wakeUp();
249
251
253
256 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
257
262
267
272
277
282
287
292
297
302
307
311 bool isLocked();
312
318 void setForcedCinecam(int cinecamId, int flags);
319
324
331 bool getForcedCinecam(int& inout, int& inout);
332
336 int getNumCinecams() const;
337
341 int getCameraCount() const;
342
346 int getCameraPosNode(int camIndex) const;
347
351 int getCameraDirNode(int camIndex) const;
352
356 int getCameraRollNode(int camIndex) const;
357
359
362
368 float getEventValue(inputEvents eventID, bool pure = false, inputSourceType valueSource = inputSourceType::IST_ANY);
369
376
382 bool getEventBoolValueBounce(inputEvents eventID, float time = 0.2f);
383
388
393
398
407 void setEventSimulatedValue(inputEvents eventID, float value);
408
414
417 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
418
423
428
433
438
443
448
453
458
463
468
470
473 // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
474
480
485 void setBlinkType(int blink);
486
490 bool getCustomLightVisible(int number);
491
495 void setCustomLightVisible(int number, bool visible);
496
501
506
511
516
521
526
528
531 // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
532
536 string getTruckName();
537
542
547
552
557
559};
560
563
564} //namespace Script2Game
quaternion()
Binding of RoR::AeroEngine.
Binding of RoR::Autopilot.
Binding of RoR::Actor; a softbody-physics gameplay object, can be anything from soda can to space shu...
Definition BeamClass.h:15
TruckState getTruckState()
float getHeadingDirectionAngle()
Returns the angle in which the truck is heading.
bool getEventBoolValue(inputEvents eventID)
Returns true if the given eventID is active, false otherwise.
float getNodeMass(int nodeNumber)
Returns the current mass of the node.
bool hasEventSimulatedValue(inputEvents eventID)
Returns true if the actor simulates the given input event.
int getNodeCount()
Gets the total amount of nodes of the truck.
float getRotation()
Returns the angle in which the truck is heading.
void setAirbrakeIntensity(float level)
Sets the air braking level for aircraft, from 0 (no braking) to 5 (maximum braking).
bool isNodeWheelRim(int nodeNumber)
Is node marked as wheel rim? Note some wheel models use only tire nodes.
float getTotalMass(bool withLocked)
Gets the total mass of the truck.
VehicleAIClass getVehicleAI()
Retrieve the waypoint AI object.
void setNodeMass(int nodeNumber, float mass)
Overrides the node's mass.
bool getReverseLightVisible()
Returns true if the reverse lights are enabled.
int getCameraCount() const
Reports number of installed cameras.
void cruisecontrolToggle()
Toggles the cruise control.
vector3 getNodeForces(int nodeNumber)
Returns the sum of all the forces applied to the node.
float getWheelSpeed()
Gets the current wheel speed of the vehicle.
void setMass(float m)
Sets the dry mass of the truck.
void setEventSimulatedValue(inputEvents eventID, float value)
Sets a float value that simulates the state of the given input event, exclusively for this actor.
void tractioncontrolToggle()
Toggles the traction control.
TurbojetClass getTurbojet(int index)
void setForcedCinecam(int cinecamId, int flags)
Sets a forced cinecam for this actor; This disables camera hotkeys.
bool getCustomParticleMode()
Gets the custom particles mode.
EngineClass getEngine()
Retrieve engine/transmission simulator.
void clearForcedCinecam()
Resets the effect of setForcedCinecam();.
void beaconsToggle()
Toggles the beacons.
void scaleTruck(float ratio)
Scales the truck.
int getCameraDirNode(int camIndex) const
Returns the direction node number for the camera at the specified index.
vector3 getNodeVelocity(int nodeNumber)
Returns the velocity vector of the node.
string getTruckFileResourceGroup()
Gets the name of the OGRE resource group where the truck definition file lives.
int getNumCinecams() const
Reports number of installed cinecams.
void setNodeMassOptions(int nodeNumber, bool loaded, bool overrideMass)
Sets the mass options of the node.
void resetEventSimulatedValue(inputEvents eventID)
Resets the simulated value for the given input event.
float getEventValue(inputEvents eventID, bool pure=false, inputSourceType valueSource=inputSourceType::IST_ANY)
Returns the simulated value associated to the given eventID.
ScrewpropClass getScrewprop(int index)
int getBlinkType()
Gets the blinking type.
string getTruckName()
Gets the designated name of the truck.
void setLoadedMass(float loadMass)
Sets the load mass of the truck.
string getSectionConfig()
Gets the name of the loaded section for a truck.
void setIndexedSimAttribute(ActorSimAttr attr, float val, int index)
Allows advanced users to set physics settings directly, including some not accessible from rig-def fi...
int getWheelNodeCount()
Gets the total amount of nodes of the wheels of the truck.
void toggleCustomParticles()
Toggles the custom particles.
vector3 getGForces()
Gets the G-forces that this truck is currently experiencing.
bool getParkingBrake()
Returns whether the parking brake is engaged.
bool getCustomLightVisible(int number)
Returns true if the custom light with the number number is enabled.
DashBoardManagerClass getDashboardManager()
Retrieve dashboard manager.
void setSimAttribute(ActorSimAttr attr, float val)
Allows advanced users to set physics settings directly, including some not accessible from rig-def fi...
void antilockbrakeToggle()
Toggles the anti-lock brakes.
void setAircraftFlaps(int level)
Sets the flaps level for aircraft, from 0 (flaps up) to 5 (flaps fully down).
bool getForcedCinecam(int &inout, int &inout)
Reports the values submitted by setForcedCinecam();.
bool getCruiseControl()
Returns whether cruise control is engaged.
string getTruckFileName()
Gets the name of the truck definition file.
void getNodeMassOptions(int nodeNumber, bool &loaded, bool &overrideMass)
Returns the mass options of the node.
int countCustomLights(int)
Counts flares using the given custom light group number (1-10).
void setBlinkType(int blink)
Sets the blinking type.
TurbopropClass getTurboprop(int index)
float getSimAttribute(ActorSimAttr attr)
int getCameraPosNode(int camIndex) const
Returns the position node number for the camera at the specified index.
vector3 getNodePosition(int nodeNumber)
Returns the position of the node.
bool getBrakeLightVisible()
Returns true if the brake light is enabled.
int countFlaresByType(FlareType)
Counts flares using the given type.
bool getTractionControl()
Returns whether traction control is enabled.
void reset(bool keep_position)
Resets the truck.
AircraftEngineClass getAircraftEngine(int index)
vector3 getPosition()
Get vehicle absolute position.
quaternion getOrientation()
Orientation on all axes packed to single quaternion.
bool isNodeWheelTire(int nodeNumber)
Is node marked as wheel tire? Note some wheel models use only tire nodes.
int getInstanceId()
Gets the unique Actor Instance ID; The same value as provided by Game2Script::eventCallbackEx().
bool getAntiLockBrake()
Returns whether the anti-lock brake system (ABS) is enabled.
void recalculateNodeMasses()
Recalculates the masses of all the nodes.
float getSpeed()
Returns the current physical speed of the vehicle, in meters per second.
void setCustomLightVisible(int number, bool visible)
Enables or disables the custom light.
bool getBeaconMode()
Gets the mode of the beacon.
float getEventSimulatedValue(inputEvents eventID)
Returns the simulated value of the given input event for the actor, or 0 if the event value is not si...
float getIndexedSimAttribute(ActorSimAttr attr, int index)
vector3 getVehiclePosition()
bool isLocked()
Returns true if a hook of this truck is locked.
bool getEventBoolValueBounce(inputEvents eventID, float time=0.2f)
Returns true if the given input event is active and the bouncing on/off cycle is in 'on' state.
float getNodeInitialMass(int nodeNumber)
Returns the initial mass of the node.
void parkingbrakeToggle()
Toggles the parking brake.
void clearEventSimulatedValues()
Removes all the event simulated values for the actor.
AutopilotClass getAutopilot()
Retrieves the autopilot system object, or null if unavailable.
int getCameraRollNode(int camIndex) const
Returns the roll node number for the camera at the specified index.
Binding of RoR::DashBoardManager.
Binding of RoR::EngineSim; A land vehicle engine + transmission.
Definition EngineClass.h:17
Binding of RoR::Screwprop.
Binding of RoR::Turbojet.
Binding of RoR::Turboprop.
Binding of RoR::VehicleAI; Vehicle driving AI using waypoints.
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
inputEvents
Binding of RoR::inputEvents; Used with Script2Game::InputEngineClass.
Definition inputEvents.h:20
TruckState
Binding of RoR::ActorState.
Definition TruckState.h:20
ActorSimAttr
Binding of RoR::ActorSimAttr; Parameter to BeamClass::setSimAttribute() and BeamClass::setIndexedSimA...
FlareType
Binding of RoR::FlareType.
Definition FlareType.h:19
inputSourceType
Binding of RoR::InputSourceType; Used with Script2Game::InputEngineClass.
@ IST_ANY
Digital and analog devices.