![]() |
DI-Guy SDK Documentation
13.7.1
|
Attached to certain types of more complex vehicles, to manage their behavior. More...
#include <diguyVehicleController.h>
Public Member Functions | |
| diguyCharacter * | get_vehicle_character () |
| void | set_speed (float speed, diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| This function sets the vehicle's speed. More... | |
| float | get_speed (diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| Returns vehicle's current speed. More... | |
| void | set_desired_speed_with_acceleration (float desired_speed, float acceleration, diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| Vehicle's speed will increase or decrease over time to match the desired speed. More... | |
| void | set_desired_speed_with_acceleration_time (float desired_speed, float acceleration_time, diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| An acceleration value is calculated from the time interval and the difference between current speed and desired speed. More... | |
| float | get_desired_speed (diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| Returns the desired speed, as currently set. More... | |
| void | set_default_acceleration (float acceleration, diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| Sets the default acceleration value that will be used whenever the vehicle needs to raise its speed. More... | |
| float | get_default_acceleration (diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| void | set_default_deceleration (float deceleration, diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| Sets the default deceleration value that will be used whenever the vehicle needs to lower its speed. More... | |
| float | get_default_deceleration (diguySpeedUnits units=DIGUY_SPEED_UNITS_METERS_PER_SECOND) |
| void | set_vehicle_simulation_mode (diguyVehicleSimulationMode vsim_mode) |
| Sets the simulation mode, which corresponds, roughly, to the degree of realism of the vehicle's movements. More... | |
| diguyVehicleSimulationMode | get_vehicle_simulation_mode () |
| Returns value set by set_vehicle_simulation_mode() More... | |
| void | set_front_wheels_steer_angle (float angle) |
| Only works in DIGUY_VEHICLE_SIMULATION_MODE_STEERING. More... | |
| float | get_front_wheels_steer_angle () |
| See set_front_wheels_steer_angle() More... | |
| void | set_desired_front_wheels_steer_angle (float desired_angle, float angle_change_rate=DIGUY_DEFAULT_FLOAT) |
| Similar to set_desired_front_wheels_steer_angle(), but sets the angle that the wheels will eventually move to, at the rate specified. More... | |
| float | get_desired_front_wheels_steer_angle () |
| See set_desired_front_wheels_steer_angle() More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| bdiScenarioVehicleController * | m_scripted_object |
| A pointer to internal data. More... | |
| class | bdiScenarioVehicleController |
| bdiScenarioVehicleController * | get_scripted_object () |
| diguyVehicleController (bdiScenarioVehicleController *vehicle_controller) | |
| A private constructor. More... | |
Attached to certain types of more complex vehicles, to manage their behavior.
An instance of this class is attached to vehicles that are of the following character types.
vehicle_09 vehicle_wheels vehicle_turret
These vehicles might be wheeled vehicles, turreted vehicles, or "complete" vehicles. The set does not include vehicles that belong to the older character type, "vehicle"; this character type does not support rotating or turning wheels. Some vehicles in vehicle_09 are helicopters and support rotating blades. Some feature rotating gun turrets.
|
private |
A private constructor.
| diguyCharacter* diguyVehicleController::get_vehicle_character | ( | ) |
| void diguyVehicleController::set_speed | ( | float | speed, |
| diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND |
||
| ) |
This function sets the vehicle's speed.
The speed becomes effective immediately; no acceleration or deceleration is applied.
| speed | new speed of vehicle |
| units | units of speed |
Callable From:
| float diguyVehicleController::get_speed | ( | diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND | ) |
Returns vehicle's current speed.
See set_speed().
| void diguyVehicleController::set_desired_speed_with_acceleration | ( | float | desired_speed, |
| float | acceleration, | ||
| diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND |
||
| ) |
Vehicle's speed will increase or decrease over time to match the desired speed.
If necessary, the acceleration value will be applied as deceleration instead.
| void diguyVehicleController::set_desired_speed_with_acceleration_time | ( | float | desired_speed, |
| float | acceleration_time, | ||
| diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND |
||
| ) |
An acceleration value is calculated from the time interval and the difference between current speed and desired speed.
| float diguyVehicleController::get_desired_speed | ( | diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND | ) |
Returns the desired speed, as currently set.
| void diguyVehicleController::set_default_acceleration | ( | float | acceleration, |
| diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND |
||
| ) |
Sets the default acceleration value that will be used whenever the vehicle needs to raise its speed.
| float diguyVehicleController::get_default_acceleration | ( | diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND | ) |
| void diguyVehicleController::set_default_deceleration | ( | float | deceleration, |
| diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND |
||
| ) |
Sets the default deceleration value that will be used whenever the vehicle needs to lower its speed.
| float diguyVehicleController::get_default_deceleration | ( | diguySpeedUnits | units = DIGUY_SPEED_UNITS_METERS_PER_SECOND | ) |
| void diguyVehicleController::set_vehicle_simulation_mode | ( | diguyVehicleSimulationMode | vsim_mode | ) |
Sets the simulation mode, which corresponds, roughly, to the degree of realism of the vehicle's movements.
Values:
| diguyVehicleSimulationMode diguyVehicleController::get_vehicle_simulation_mode | ( | ) |
Returns value set by set_vehicle_simulation_mode()
| void diguyVehicleController::set_front_wheels_steer_angle | ( | float | angle | ) |
Only works in DIGUY_VEHICLE_SIMULATION_MODE_STEERING.
Sets the steering angle of the front wheels, with zero being straight ahead.
| float diguyVehicleController::get_front_wheels_steer_angle | ( | ) |
| void diguyVehicleController::set_desired_front_wheels_steer_angle | ( | float | desired_angle, |
| float | angle_change_rate = DIGUY_DEFAULT_FLOAT |
||
| ) |
Similar to set_desired_front_wheels_steer_angle(), but sets the angle that the wheels will eventually move to, at the rate specified.
| float diguyVehicleController::get_desired_front_wheels_steer_angle | ( | ) |
|
inline |
|
friend |
|
private |
A pointer to internal data.