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 
84  vector3 isNodeWheelRim(int nodeNumber);
85 
91  vector3 isNodeWheelTire(int nodeNumber);
92 
96  int getWheelNodeCount();
97 
101  float getWheelSpeed();
102 
108  void reset(bool keep_position);
109 
111 
114  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
115 
119  void scaleTruck(float ratio);
120 
124  void setMass(float m);
125 
127 
130  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
131 
135  void parkingbrakeToggle();
136 
140  void tractioncontrolToggle();
141 
145  void antilockbrakeToggle();
146 
150  void toggleCustomParticles();
151 
155  bool getCustomParticleMode();
156 
160  bool isLocked();
161 
163 
166  // PLEASE maintain the same ordering as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
167 
168 
172  VehicleAiClass getVehicleAI();
173 
175 
178  // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
179 
184  int getBlinkType();
185 
190  void setBlinkType(int blink);
191 
195  bool getCustomLightVisible(int number);
196 
200  void setCustomLightVisible(int number, bool visible);
201 
205  bool getBeaconMode();
206 
210  void beaconsToggle();
211 
215  bool getBrakeLightVisible();
216 
220  bool getReverseLightVisible();
221 
225  int countCustomLights(int);
226 
231 
233 
236  // PLEASE maintain the same order as in 'Actor.h' and 'scripting/bindings/ActorAngelscript.cpp'
237 
241  string getTruckName();
242 
246  string getTruckFileName();
247 
251  string getTruckFileResourceGroup();
252 
256  string getSectionConfig();
257 
261  int getInstanceId();
262 
264 }
265 
268 
269 } //namespace Script2Game
270 
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::isNodeWheelRim
vector3 isNodeWheelRim(int nodeNumber)
Is node marked as wheel rim? Note some wheel models use only tire nodes.
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:551
Script2Game::BeamClass::getNodePosition
vector3 getNodePosition(int nodeNumber)
Returns the position of the node.
Script2Game::BeamClass::isNodeWheelTire
vector3 isNodeWheelTire(int nodeNumber)
Is node marked as wheel tire? Note some wheel models use only tire nodes.
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.