DI-Guy SDK Documentation  13.1
diguyVehicleController.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************
8  **
9  *t diguyVehicleController
10  **
11  */
12 
13 #ifndef __diguyVehicleController_H
14 #define __diguyVehicleController_H
15 
16 #ifdef SWIG
18 #else
19 #define CPLUSPLUS_ONLY
20 #endif
21 
22 #ifdef CPLUSPLUS_ONLY
23 
24 #include <declspec_diguy.h>
25 #include <diguy_constants.h>
26 
27 class diguyCharacter;
28 class bdiScenarioVehicleController;
29 
30 #endif
31 
49 /****************************************************************************/
50 class BDI_DECLSPEC_diguy diguyVehicleController
51 {
52 
53 public:
54 
55 /*****************************************************************************
56  **
57  *2 Character Functions
58  **
59  */
60  diguyCharacter* get_vehicle_character();
61 
62 
63 /*****************************************************************************
64  **
65  *2 Speed Functions
66  **
67  ** These functions should only be used in free action mode.
68  **
69  */
70 
71  /*l
72  *b Description:
73  **
74  ** This function sets the vehicle's speed. The speed becomes
75  ** effective immediately; no acceleration or deceleration is applied.
76  **
77  *b Arguments:
78  **
79  *a speed - new speed of vehicle
80  *a units - units of speed
81  **
82  *b Callable From:
83  **
84  *- - C++
85  *- - Script
86  */
87  void set_speed(float speed,
89 
90  /*
91  * Documentation Pending
92  */
94 
95  /*l
96  ** Vehicle's speed will increase or decrease over time to match the desired speed.
97  ** If necessary, the acceleration value will be applied as deceleration instead.
98  */
99  void set_desired_speed_with_acceleration(float desired_speed,
100  float acceleration,
102 
103  /*l
104  ** An acceleration value is calculated from the time interval and the difference
105  ** between current speed and desired speed.
106  */
107  void set_desired_speed_with_acceleration_time(float desired_speed,
108  float acceleration_time, // seconds
110 
111  /*l
112  ** Returns the desired speed, as currently set.
113  */
114  float get_desired_speed(diguySpeedUnits units = DIGUY_SPEED_UNITS_METERS_PER_SECOND);
115 
116  /*l
117  ** Sets the default acceleration value that will be used whenever the vehicle needs to raise
118  ** its speed.
119  */
120  void set_default_acceleration(float acceleration,
122  float get_default_acceleration(diguySpeedUnits units = DIGUY_SPEED_UNITS_METERS_PER_SECOND);
123 
124  /*l
125  ** Sets the default deceleration value that will be used whenever the vehicle needs to lower
126  ** its speed.
127  */
128  void set_default_deceleration(float deceleration,
130  float get_default_deceleration(diguySpeedUnits units = DIGUY_SPEED_UNITS_METERS_PER_SECOND);
131 
132 
133 /*****************************************************************************
134  **
135  *2 Steering Functions
136  **
137  ** These functions should only be used in free action mode.
138  **
139  */
140 
141  /*
142  * Documentation Pending
143  */
144  void set_vehicle_simulation_mode(diguyVehicleSimulationMode vsim_mode);
145 
146  /*
147  * Documentation Pending
148  */
149  diguyVehicleSimulationMode get_vehicle_simulation_mode();
150 
151  /*
152  * Documentation Pending
153  */
154  void set_front_wheels_steer_angle(float angle);
155 
156  /*
157  * Documentation Pending
158  */
159  float get_front_wheels_steer_angle();
160 
161  /*
162  * Documentation Pending
163  */
164  void set_desired_front_wheels_steer_angle(float desired_angle,
165  float angle_change_rate = DIGUY_DEFAULT_FLOAT);
166 
167  /*
168  * Documentation Pending
169  */
170  float get_desired_front_wheels_steer_angle();
171 
172 
177 #ifdef CPLUSPLUS_ONLY
178 
179  bdiScenarioVehicleController* get_scripted_object() {return m_scripted_object;}
180 
181 private:
182 
183  /*l
184  ** A private constructor.
185  */
186  diguyVehicleController(bdiScenarioVehicleController* vehicle_controller);
188  /*l
189  ** A pointer to internal data.
190  */
191  bdiScenarioVehicleController* m_scripted_object;
192 
193  friend class bdiScenarioVehicleController;
194 
195 #endif
196 
197 };
198 
199 #endif /* __diguyVehicleController_H */
200 
#define DIGUY_DEFAULT_FLOAT
This value is a magic number that, when passed to certain functions, means that the function should u...
Definition: diguy_constants.h:79
Definition: diguy_constants.h:1669
diguySpeedUnits
This enumeration lists units of speed that can be passed to some DI-Guy API functions.
Definition: diguy_constants.h:1667
Attached to certain types of more complex vehicles, to manage their behavior.
Definition: diguyVehicleController.h:49
The class that represents a DI-Guy Entity in the world.
Definition: diguyCharacter.h:78
diguyVehicleSimulationMode
This enumeration lists the modes that the DI-Guy vehicle simulator can be in.
Definition: diguy_constants.h:1746