Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
BeamClass.h
Go to the documentation of this file.
1
2namespace Script2Game {
3
16{
17public:
18
21 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
22
24
28 vector3 getPosition();
29
34
38 float getRotation();
39
44
49
50
53 float getSpeed();
54
59 vector3 getGForces();
60
65 float getTotalMass(bool withLocked);
66
70 float getDryMass();
71
76
81
86
91
97 vector3 getNodePosition(int nodeNumber);
98
104 float getNodeInitialMass(int nodeNumber);
105
111 float getNodeMass(int nodeNumber);
112
118 vector3 getNodeVelocity(int nodeNumber);
119
125 vector3 getNodeForces(int nodeNumber);
126
134 void getNodeMassOptions(int nodeNumber, bool& loaded, bool& overrideMass);
135
141 bool isNodeWheelRim(int nodeNumber);
142
148 bool isNodeWheelTire(int nodeNumber);
149
154
159
165 void reset(bool keep_position);
166
171
176
178
181 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
182
186 void scaleTruck(float ratio);
187
192 void setMass(float m);
193
198 void setLoadedMass(float loadMass);
199
206 void setNodeMass(int nodeNumber, float mass);
207
215 void setNodeMassOptions(int nodeNumber, bool loaded, bool overrideMass);
216
221 void setSimAttribute(ActorSimAttr attr, float val);
222
224
230
234 void setAirbrakeIntensity(float level);
235
239 void setAircraftFlaps(int level);
240
242
245 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
246
251
256
261
266
271
275 bool isLocked();
276
282 void setForcedCinecam(int cinecamId, int flags);
283
288
295 bool getForcedCinecam(int& inout, int& inout);
296
300 int getNumCinecams() const;
301
302
304
307 // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
308
309
313 DashboardManagerClassPtr @getDashboardManager();
314
318 VehicleAiClass @getVehicleAI();
319
323 EngineClassPtr @getEngine();
324
329
334
339
344
349
354
359
361
364 // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
365
371
376 void setBlinkType(int blink);
377
381 bool getCustomLightVisible(int number);
382
386 void setCustomLightVisible(int number, bool visible);
387
392
397
402
407
412
417
419
422 // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
423
427 string getTruckName();
428
433
438
443
448
450}
451
454
455} //namespace Script2Game
456
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:16
TruckState getTruckState()
float getHeadingDirectionAngle()
Returns the angle in which the truck is heading.
float getNodeMass(int nodeNumber)
Returns the current mass of the node.
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.
void setNodeMass(int nodeNumber, float mass)
Overrides the node's mass.
bool getReverseLightVisible()
Returns true if the reverse lights are enabled.
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 tractioncontrolToggle()
Toggles the tracktion 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.
void clearForcedCinecam()
Resets the effect of setForcedCinecam();.
void beaconsToggle()
Toggles the beacons.
void scaleTruck(float ratio)
Scales the truck.
VehicleAiClass getVehicleAI()
Retrieve the waypoint AI object.
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.
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.
EngineClassPtr getEngine()
Retrieve engine/transmission simulator.
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 getCustomLightVisible(int number)
Returns true if the custom light with the number number is enabled.
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();.
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)
vector3 getNodePosition(int nodeNumber)
Returns the position of the node.
bool getBrakeLightVisible()
Returns true if the brake light is enabled.
DashboardManagerClassPtr getDashboardManager()
Retrieve dashboard manager.
int countFlaresByType(FlareType)
Counts flares using the given type.
void reset(bool keep_position)
Resets the truck.
AircraftEngineClass getAircraftEngine(int index)
vector3 getPosition()
Get vehicle absolute position.
bool isNodeWheelTire(int nodeNumber)
Is node marked as wheel tire? Note some wheel models use only tire nodes.
quaternion getOrientation() float getSpeed()
Orientation on all axes packed to single quaternion.
int getInstanceId()
Gets the unique Actor Instance ID; The same value as provided by Game2Script::eventCallbackEx().
void recalculateNodeMasses()
Recalculates the masses of all the nodes.
void setCustomLightVisible(int number, bool visible)
Enables or disables the custom light.
bool getBeaconMode()
Gets the mode of the beacon.
vector3 getVehiclePosition()
bool isLocked()
Returns true if a hook of this truck is locked.
float getNodeInitialMass(int nodeNumber)
Returns the initial mass of the node.
void parkingbrakeToggle()
Toggles the parking brake.
AutopilotClass getAutopilot()
Retrieves the autopilot system object, or null if unavailable.
Binding of RoR::Screwprop.
Binding of RoR::Turbojet.
Binding of RoR::Turboprop.
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
TruckState
Binding of RoR::ActorState.
Definition TruckState.h:20
ActorSimAttr
Parameter to Script2Game::BeamClass::setSimAttribute() and Script2Game::BeamClass::getSimAttribute();...
FlareType
Binding of RoR::FlareType.
Definition FlareType.h:19