DI-Guy SDK Documentation  13.1
diguyVehicleController Class Reference

Attached to certain types of more complex vehicles, to manage their behavior. More...

#include <diguyVehicleController.h>

Public Member Functions

diguyCharacterget_vehicle_character ()
 
Speed Functions

These functions should only be used in free action mode.

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)
 
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)
 
Steering Functions

These functions should only be used in free action mode.

void set_vehicle_simulation_mode (diguyVehicleSimulationMode vsim_mode)
 
diguyVehicleSimulationMode get_vehicle_simulation_mode ()
 
void set_front_wheels_steer_angle (float angle)
 
float get_front_wheels_steer_angle ()
 
void set_desired_front_wheels_steer_angle (float desired_angle, float angle_change_rate=DIGUY_DEFAULT_FLOAT)
 
float get_desired_front_wheels_steer_angle ()
 

Private Functions

The functions and variables past this point are for internal use only.

No external access to them is expected or necessary.

bdiScenarioVehicleControllerm_scripted_object
 A pointer to internal data. More...
 
class bdiScenarioVehicleController
 
bdiScenarioVehicleControllerget_scripted_object ()
 
 diguyVehicleController (bdiScenarioVehicleController *vehicle_controller)
 A private constructor. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

diguyVehicleController::diguyVehicleController ( bdiScenarioVehicleController vehicle_controller)
private

A private constructor.

Member Function Documentation

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.

Parameters
speednew speed of vehicle
unitsunits of speed

Callable From:

  • C++
  • Script
float diguyVehicleController::get_speed ( diguySpeedUnits  units = DIGUY_SPEED_UNITS_METERS_PER_SECOND)
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)
diguyVehicleSimulationMode diguyVehicleController::get_vehicle_simulation_mode ( )
void diguyVehicleController::set_front_wheels_steer_angle ( float  angle)
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 
)
float diguyVehicleController::get_desired_front_wheels_steer_angle ( )
bdiScenarioVehicleController* diguyVehicleController::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiScenarioVehicleController
friend

Member Data Documentation

bdiScenarioVehicleController* diguyVehicleController::m_scripted_object
private

A pointer to internal data.


The documentation for this class was generated from the following file: