RigsofRods
Soft-body Physics Simulation
BeamClass.h
Go to the documentation of this file.
1 
2 namespace Script2Game {
3 
15 class BeamClass
16 {
17 public:
18 
21  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
22 
23  TruckState getTruckState();
24 
28  vector3 getPosition();
29 
33  vector3 getVehiclePosition();
34 
38  float getRotation();
39 
44 
49 
50 
53  float getSpeed();
54 
59  vector3 getGForces();
60 
65  float getTotalMass(bool withLocked);
66 
70  int getNodeCount();
71 
77  vector3 getNodePosition(int nodeNumber);
78 
82  int getWheelNodeCount();
83 
87  float getWheelSpeed();
88 
94  void reset(bool keep_position);
95 
97 
100  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
101 
105  void scaleTruck(float ratio);
106 
110  void setMass(float m);
111 
113 
116  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
117 
121  void parkingbrakeToggle();
122 
126  void tractioncontrolToggle();
127 
131  void antilockbrakeToggle();
132 
136  void toggleCustomParticles();
137 
141  bool getCustomParticleMode();
142 
146  bool isLocked();
147 
149 
152  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
153 
154 
158  VehicleAiClass getVehicleAI();
159 
161 
164  // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
165 
170  int getBlinkType();
171 
176  void setBlinkType(int blink);
177 
181  bool getCustomLightVisible(int number);
182 
186  void setCustomLightVisible(int number, bool visible);
187 
191  bool getBeaconMode();
192 
196  void beaconsToggle();
197 
201  bool getBrakeLightVisible();
202 
206  bool getReverseLightVisible();
207 
211  int countCustomLights(int);
212 
217 
219 
222  // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
223 
227  string getTruckName();
228 
232  string getTruckFileName();
233 
237  string getTruckFileResourceGroup();
238 
242  string getSectionConfig();
243 
247  int getInstanceId();
248 
250 }
251 
254 
255 } //namespace Script2Game
256 
Script2Game::BeamClass::getRotation
float getRotation()
Returns the angle in which the truck is heading.
Script2Game::BeamClass::getVehicleAI
VehicleAiClass getVehicleAI()
Retrieve the waypoint AI object.
Script2Game::BeamClass::getBrakeLightVisible
bool getBrakeLightVisible()
Returns true if the brake light is enabled.
Script2Game::BeamClass::setBlinkType
void setBlinkType(int blink)
Sets the blinking type.
Script2Game::BeamClass
Binding of RoR::Actor; a softbody-physics gameplay object, can be anything from soda can to space shu...
Definition: BeamClass.h:15
Script2Game::BeamClass::getSectionConfig
string getSectionConfig()
Gets the name of the loaded section for a truck.
Script2Game::BeamClass::isLocked
bool isLocked()
Returns true if a hook of this truck is locked.
quaternion
quaternion()
Script2Game::BeamClass::countCustomLights
int countCustomLights(int)
Counts flares using the given custom light group number (1-10).
Script2Game::BeamClass::parkingbrakeToggle
void parkingbrakeToggle()
Toggles the parking brake.
Script2Game::BeamClass::getTotalMass
float getTotalMass(bool withLocked)
Gets the total mass of the truck.
Script2Game
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
Definition: BeamClass.h:2
Script2Game::BeamClass::getInstanceId
int getInstanceId()
Gets the unique Actor Instance ID; The same value as provided by Game2Script::eventCallbackEx().
Script2Game::BeamClass::antilockbrakeToggle
void antilockbrakeToggle()
Toggles the anti-lock brakes.
Script2Game::BeamClass::getCustomLightVisible
bool getCustomLightVisible(int number)
Returns true if the custom light with the number number is enabled.
Script2Game::BeamClass::toggleCustomParticles
void toggleCustomParticles()
Toggles the custom particles.
Script2Game::BeamClass::getGForces
vector3 getGForces()
Gets the G-forces that this truck is currently experiencing.
Script2Game::BeamClass::setCustomLightVisible
void setCustomLightVisible(int number, bool visible)
Enables or disables the custom light.
Script2Game::FlareType
FlareType
Binding of RoR::FlareType.
Definition: globals.h:549
Script2Game::BeamClass::getNodePosition
vector3 getNodePosition(int nodeNumber)
Returns the position of the node.
Script2Game::BeamClass::getTruckState
TruckState getTruckState()
Script2Game::BeamClass::getHeadingDirectionAngle
float getHeadingDirectionAngle()
Returns the angle in which the truck is heading.
Script2Game::BeamClass::scaleTruck
void scaleTruck(float ratio)
Scales the truck.
Script2Game::BeamClass::getWheelSpeed
float getWheelSpeed()
Gets the current wheel speed of the vehicle.
Script2Game::BeamClass::getBeaconMode
bool getBeaconMode()
Gets the mode of the beacon.
Script2Game::BeamClass::getOrientation
quaternion getOrientation() float getSpeed()
Orientation on all axes packed to single quaternion.
Script2Game::BeamClass::tractioncontrolToggle
void tractioncontrolToggle()
Toggles the tracktion control.
Script2Game::BeamClass::getTruckName
string getTruckName()
Gets the designated name of the truck.
Script2Game::BeamClass::getWheelNodeCount
int getWheelNodeCount()
Gets the total amount of nodes of the wheels of the truck.
Script2Game::BeamClass::countFlaresByType
int countFlaresByType(FlareType)
Counts flares using the given type.
Script2Game::BeamClass::getPosition
vector3 getPosition()
Get vehicle absolute position.
Script2Game::BeamClass::getBlinkType
int getBlinkType()
Gets the blinking type.
Script2Game::BeamClass::beaconsToggle
void beaconsToggle()
Toggles the beacons.
Script2Game::BeamClass::reset
void reset(bool keep_position)
Resets the truck.
Script2Game::BeamClass::getNodeCount
int getNodeCount()
Gets the total amount of nodes of the truck.
Script2Game::BeamClass::setMass
void setMass(float m)
Sets the mass of the truck.
Script2Game::BeamClass::getReverseLightVisible
bool getReverseLightVisible()
Returns true if the reverse lights are enabled.
Script2Game::BeamClass::getVehiclePosition
vector3 getVehiclePosition()
Script2Game::BeamClass::getTruckFileName
string getTruckFileName()
Gets the name of the truck definition file.
Script2Game::BeamClass::getTruckFileResourceGroup
string getTruckFileResourceGroup()
Gets the name of the OGRE resource group where the truck definition file lives.
Script2Game::BeamClass::getCustomParticleMode
bool getCustomParticleMode()
Gets the custom particles mode.