![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
Binding of RoR::Actor; a softbody-physics gameplay object, can be anything from soda can to space shuttle.
Definition at line 14 of file BeamClass.h.
| void Script2Game::BeamClass::antilockbrakeToggle | ( | ) |
Toggles the anti-lock brakes.
| void Script2Game::BeamClass::beaconsToggle | ( | ) |
Toggles the beacons.
| void Script2Game::BeamClass::clearEventSimulatedValues | ( | ) |
Removes all the event simulated values for the actor.
| void Script2Game::BeamClass::clearForcedCinecam | ( | ) |
Resets the effect of setForcedCinecam();.
| int Script2Game::BeamClass::countCustomLights | ( | int | ) |
Counts flares using the given custom light group number (1-10).
| int Script2Game::BeamClass::countFlaresByType | ( | FlareType | ) |
Counts flares using the given type.
| void Script2Game::BeamClass::cruisecontrolToggle | ( | ) |
Toggles the cruise control.
| float Script2Game::BeamClass::getAirbrakeIntensity | ( | ) |
| AircraftEngineClass Script2Game::BeamClass::getAircraftEngine | ( | int | index | ) |
null if the engine does not exist. | int Script2Game::BeamClass::getAircraftEngineCount | ( | ) |
| int Script2Game::BeamClass::getAircraftFlaps | ( | ) |
| bool Script2Game::BeamClass::getAntiLockBrake | ( | ) |
Returns whether the anti-lock brake system (ABS) is enabled.
| AutopilotClass Script2Game::BeamClass::getAutopilot | ( | ) |
Retrieves the autopilot system object, or null if unavailable.
| bool Script2Game::BeamClass::getBeaconMode | ( | ) |
Gets the mode of the beacon.
| int Script2Game::BeamClass::getBlinkType | ( | ) |
Gets the blinking type.
| bool Script2Game::BeamClass::getBrakeLightVisible | ( | ) |
Returns true if the brake light is enabled.
| int Script2Game::BeamClass::getCameraCount | ( | ) | const |
Reports number of installed cameras.
| int Script2Game::BeamClass::getCameraDirNode | ( | int | camIndex | ) | const |
Returns the direction node number for the camera at the specified index.
| int Script2Game::BeamClass::getCameraPosNode | ( | int | camIndex | ) | const |
Returns the position node number for the camera at the specified index.
| int Script2Game::BeamClass::getCameraRollNode | ( | int | camIndex | ) | const |
Returns the roll node number for the camera at the specified index.
| bool Script2Game::BeamClass::getCruiseControl | ( | ) |
Returns whether cruise control is engaged.
| bool Script2Game::BeamClass::getCustomLightVisible | ( | int | number | ) |
Returns true if the custom light with the number number is enabled.
| bool Script2Game::BeamClass::getCustomParticleMode | ( | ) |
Gets the custom particles mode.
| DashBoardManagerClass Script2Game::BeamClass::getDashboardManager | ( | ) |
Retrieve dashboard manager.
| float Script2Game::BeamClass::getDryMass | ( | ) |
| EngineClass Script2Game::BeamClass::getEngine | ( | ) |
Retrieve engine/transmission simulator.
| bool Script2Game::BeamClass::getEventBoolValue | ( | inputEvents | eventID | ) |
Returns true if the given eventID is active, false otherwise.
If the eventID is simulated, returns true if the value is greater than 0.5.
| bool Script2Game::BeamClass::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.
If the eventID is simulated, it behaves the same way as getEventBoolValue(), ignoring the time parameter.
| float Script2Game::BeamClass::getEventSimulatedValue | ( | inputEvents | eventID | ) |
Returns the simulated value of the given input event for the actor, or 0 if the event value is not simulated.
| float Script2Game::BeamClass::getEventValue | ( | inputEvents | eventID, |
| bool | pure = false, |
||
| inputSourceType | valueSource = inputSourceType::IST_ANY |
||
| ) |
Returns the simulated value associated to the given eventID.
If eventID is not simulated, returns the same value as InputEngineClass.getEventValue().
| pure | When true, the returned input value won't be adjusted for parameters such as deadzone or linearity on joysticks. |
| valueSource | Indicates the type of input device the event value should be retrieved from. |
| bool Script2Game::BeamClass::getForcedCinecam | ( | int & | inout, |
| int & | inout | ||
| ) |
Reports the values submitted by setForcedCinecam();.
| cinecamId | Cinecams are numbered from 0, use getNumCinecams(); -1 means no cinecam. |
| flags | Flags are reserved for future use. |
| vector3 Script2Game::BeamClass::getGForces | ( | ) |
Gets the G-forces that this truck is currently experiencing.
| float Script2Game::BeamClass::getHeadingDirectionAngle | ( | ) |
Returns the angle in which the truck is heading.
| float Script2Game::BeamClass::getIndexedSimAttribute | ( | ActorSimAttr | attr, |
| int | index | ||
| ) |
| float Script2Game::BeamClass::getInitialDryMass | ( | ) |
| float Script2Game::BeamClass::getInitialLoadedMass | ( | ) |
| int Script2Game::BeamClass::getInstanceId | ( | ) |
Gets the unique Actor Instance ID; The same value as provided by Game2Script::eventCallbackEx().
| float Script2Game::BeamClass::getLoadedMass | ( | ) |
| int Script2Game::BeamClass::getNodeCount | ( | ) |
Gets the total amount of nodes of the truck.
| vector3 Script2Game::BeamClass::getNodeForces | ( | int | nodeNumber | ) |
Returns the sum of all the forces applied to the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| float Script2Game::BeamClass::getNodeInitialMass | ( | int | nodeNumber | ) |
Returns the initial mass of the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| float Script2Game::BeamClass::getNodeMass | ( | int | nodeNumber | ) |
Returns the current mass of the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| void Script2Game::BeamClass::getNodeMassOptions | ( | int | nodeNumber, |
| bool & | loaded, | ||
| bool & | overrideMass | ||
| ) |
Returns the mass options of the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| loaded | Reference parameter. Indicates whether the node bears a part of the cargo load. |
| overrideMass | Reference parameter. Indicates whether the node mass can be overriden. |
| vector3 Script2Game::BeamClass::getNodePosition | ( | int | nodeNumber | ) |
Returns the position of the node.
| the | number of the node (counts from 0, see getNodeCount()) |
| vector3 Script2Game::BeamClass::getNodeVelocity | ( | int | nodeNumber | ) |
Returns the velocity vector of the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| int Script2Game::BeamClass::getNumCinecams | ( | ) | const |
Reports number of installed cinecams.
| quaternion Script2Game::BeamClass::getOrientation | ( | ) |
Orientation on all axes packed to single quaternion.
Use getYaw(), getPitch() and getRoll() for individual rotations in radians.
| bool Script2Game::BeamClass::getParkingBrake | ( | ) |
Returns whether the parking brake is engaged.
| vector3 Script2Game::BeamClass::getPosition | ( | ) |
Get vehicle absolute position.
| bool Script2Game::BeamClass::getReverseLightVisible | ( | ) |
Returns true if the reverse lights are enabled.
| float Script2Game::BeamClass::getRotation | ( | ) |
Returns the angle in which the truck is heading.
| ScrewpropClass Script2Game::BeamClass::getScrewprop | ( | int | index | ) |
null if the screwprop doesn't exist. | int Script2Game::BeamClass::getScrewpropCount | ( | ) |
| string Script2Game::BeamClass::getSectionConfig | ( | ) |
Gets the name of the loaded section for a truck.
| float Script2Game::BeamClass::getSimAttribute | ( | ActorSimAttr | attr | ) |
| float Script2Game::BeamClass::getSpeed | ( | ) |
Returns the current physical speed of the vehicle, in meters per second.
| float Script2Game::BeamClass::getTotalMass | ( | bool | withLocked | ) |
Gets the total mass of the truck.
| withLocked | if true, the mass of everything locked to the truck will be added to the mass of the truck. |
| bool Script2Game::BeamClass::getTractionControl | ( | ) |
Returns whether traction control is enabled.
| string Script2Game::BeamClass::getTruckFileName | ( | ) |
Gets the name of the truck definition file.
| string Script2Game::BeamClass::getTruckFileResourceGroup | ( | ) |
Gets the name of the OGRE resource group where the truck definition file lives.
Useful for loading using GenericDocumentClass.
| string Script2Game::BeamClass::getTruckName | ( | ) |
Gets the designated name of the truck.
| TruckState Script2Game::BeamClass::getTruckState | ( | ) |
| TurbojetClass Script2Game::BeamClass::getTurbojet | ( | int | index | ) |
null if the engine is not a turbojet or doesn't exist. | TurbopropClass Script2Game::BeamClass::getTurboprop | ( | int | index | ) |
null if the engine is not a propeller or doesn't exist. | VehicleAIClass Script2Game::BeamClass::getVehicleAI | ( | ) |
Retrieve the waypoint AI object.
| vector3 Script2Game::BeamClass::getVehiclePosition | ( | ) |
getPosition() | int Script2Game::BeamClass::getWheelNodeCount | ( | ) |
Gets the total amount of nodes of the wheels of the truck.
| float Script2Game::BeamClass::getWheelSpeed | ( | ) |
Gets the current wheel speed of the vehicle.
| bool Script2Game::BeamClass::hasEventSimulatedValue | ( | inputEvents | eventID | ) |
Returns true if the actor simulates the given input event.
| bool Script2Game::BeamClass::isLocked | ( | ) |
Returns true if a hook of this truck is locked.
| bool Script2Game::BeamClass::isNodeWheelRim | ( | int | nodeNumber | ) |
Is node marked as wheel rim? Note some wheel models use only tire nodes.
See https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#wheels
| the | number of the node (counts from 0, see getNodeCount()) |
| bool Script2Game::BeamClass::isNodeWheelTire | ( | int | nodeNumber | ) |
Is node marked as wheel tire? Note some wheel models use only tire nodes.
See https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#wheels
| the | number of the node (counts from 0, see getNodeCount()) |
| void Script2Game::BeamClass::parkingbrakeToggle | ( | ) |
Toggles the parking brake.
| void Script2Game::BeamClass::recalculateNodeMasses | ( | ) |
Recalculates the masses of all the nodes.
| void Script2Game::BeamClass::reset | ( | bool | keep_position | ) |
Resets the truck.
| reset_position | true if you want to keep the truck at the current position. (otherwise, it will be moved to its origin position) |
| void Script2Game::BeamClass::resetEventSimulatedValue | ( | inputEvents | eventID | ) |
Resets the simulated value for the given input event.
| void Script2Game::BeamClass::scaleTruck | ( | float | ratio | ) |
Scales the truck.
| void Script2Game::BeamClass::sendToSleep | ( | ) |
| void Script2Game::BeamClass::setAirbrakeIntensity | ( | float | level | ) |
Sets the air braking level for aircraft, from 0 (no braking) to 5 (maximum braking).
| void Script2Game::BeamClass::setAircraftFlaps | ( | int | level | ) |
Sets the flaps level for aircraft, from 0 (flaps up) to 5 (flaps fully down).
| void Script2Game::BeamClass::setBlinkType | ( | int | blink | ) |
Sets the blinking type.
| void Script2Game::BeamClass::setCustomLightVisible | ( | int | number, |
| bool | visible | ||
| ) |
Enables or disables the custom light.
| void Script2Game::BeamClass::setEventSimulatedValue | ( | inputEvents | eventID, |
| float | value | ||
| ) |
Sets a float value that simulates the state of the given input event, exclusively for this actor.
As soon as an event is associated to a simulated value, functions like getEventValue() will ignore the values returned by the input engine and return the simulated value instead.
If you want to stop simulating the event value, call resetEventSimulatedValue().
| void Script2Game::BeamClass::setForcedCinecam | ( | int | cinecamId, |
| int | flags | ||
| ) |
Sets a forced cinecam for this actor; This disables camera hotkeys.
| cinecamId | Cinecams are numbered from 0, use getNumCinecams(); -1 means no cinecam. |
| flags | Flags are reserved for future use. |
| void Script2Game::BeamClass::setIndexedSimAttribute | ( | ActorSimAttr | attr, |
| float | val, | ||
| int | index | ||
| ) |
Allows advanced users to set physics settings directly, including some not accessible from rig-def file format.
HAZARDOUS - values may not be checked; Pay attention to 'safe values' at each attribute description.
| void Script2Game::BeamClass::setLoadedMass | ( | float | loadMass | ) |
Sets the load mass of the truck.
recalculateNodeMasses() to make your changes effective. | void Script2Game::BeamClass::setMass | ( | float | m | ) |
Sets the dry mass of the truck.
recalculateNodeMasses() to make your changes effective. | void Script2Game::BeamClass::setNodeMass | ( | int | nodeNumber, |
| float | mass | ||
| ) |
Overrides the node's mass.
l option) and its mass can't be overriden, this function has no effect. recalculateNodeMasses() to make your changes effective. | void Script2Game::BeamClass::setNodeMassOptions | ( | int | nodeNumber, |
| bool | loaded, | ||
| bool | overrideMass | ||
| ) |
Sets the mass options of the node.
| nodeNumber | The number of the node (counts from 0, see getNodeCount()) |
| loaded | Allows the node to bear a part of the cargo load. |
| overrideMass | Allows the node mass to be overriden. |
recalculateNodeMasses() to make your changes effective. | void Script2Game::BeamClass::setSimAttribute | ( | ActorSimAttr | attr, |
| float | val | ||
| ) |
Allows advanced users to set physics settings directly, including some not accessible from rig-def file format.
HAZARDOUS - values may not be checked; Pay attention to 'safe values' at each attribute description.
| void Script2Game::BeamClass::toggleCustomParticles | ( | ) |
Toggles the custom particles.
| void Script2Game::BeamClass::tractioncontrolToggle | ( | ) |
Toggles the traction control.
| void Script2Game::BeamClass::wakeUp | ( | ) |