20 _forward_speed = speed;
29 return _forward_speed;
38 _reverse_speed = speed;
47 return _reverse_speed;
56 _rotate_speed = speed;
77 _vertical_dead_zone = speed;
88 return _vertical_dead_zone;
99 _horizontal_dead_zone = speed;
110 return _horizontal_dead_zone;
120 _vertical_ramp_up_time = ramp_up_time;
130 return _vertical_ramp_up_time;
139 _vertical_ramp_down_time = ramp_down_time;
148 return _vertical_ramp_down_time;
157 _horizontal_ramp_up_time = ramp_up_time;
166 return _horizontal_ramp_up_time;
175 _horizontal_ramp_down_time = ramp_down_time;
184 return _horizontal_ramp_down_time;
211 INLINE PN_stdfloat DriveInterface::
216 INLINE PN_stdfloat DriveInterface::
221 INLINE PN_stdfloat DriveInterface::
236 set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
240 INLINE
void DriveInterface::
241 set_x(PN_stdfloat x) {
245 INLINE
void DriveInterface::
246 set_y(PN_stdfloat y) {
250 INLINE
void DriveInterface::
251 set_z(PN_stdfloat z) {
264 INLINE PN_stdfloat DriveInterface::
269 INLINE PN_stdfloat DriveInterface::
274 INLINE PN_stdfloat DriveInterface::
285 set_hpr(hpr[0], hpr[1], hpr[2]);
289 set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) {
295 INLINE
void DriveInterface::
296 set_h(PN_stdfloat h) {
297 _hpr[0] = _hpr_quantize * floor(h / _hpr_quantize + 0.5f);
300 INLINE
void DriveInterface::
301 set_p(PN_stdfloat p) {
302 _hpr[1] = _hpr_quantize * floor(p / _hpr_quantize + 0.5f);
305 INLINE
void DriveInterface::
306 set_r(PN_stdfloat r) {
307 _hpr[2] = _hpr_quantize * floor(r / _hpr_quantize + 0.5f);
320 _ignore_mouse = ignore_mouse;
329 return _ignore_mouse;
338 _force_mouse = force_mouse;
359 _stop_this_frame = stop_this_frame;
368 return _stop_this_frame;
PN_stdfloat get_rot_speed() const
Returns the rot_speed of the previous update in units/sec.
void set_horizontal_dead_zone(PN_stdfloat zone)
Sets the size of the vertical bar in the center of the screen that represents the "dead zone" of hori...
PN_stdfloat get_vertical_dead_zone() const
Returns the size of the horizontal bar in the center of the screen that represents the "dead zone" of...
PN_stdfloat get_horizontal_ramp_up_time() const
Returns the amount of time, in seconds, it takes between the time a left or right arrow key is presse...
PN_stdfloat get_reverse_speed() const
Returns the speed of full reverse motion, when the mouse is at the very bottom of the window.
void set_pos(const LVecBase3 &vec)
Directly sets the driver's position.
void set_ignore_mouse(bool ignore_mouse)
Changes the state of the ignore_mouse flag.
void set_rotate_speed(PN_stdfloat speed)
Sets the maximum rate at which the user can rotate left or right, when the mouse is at the very edge ...
PN_stdfloat get_speed() const
Returns the speed of the previous update in units/sec.
PN_stdfloat get_horizontal_dead_zone() const
Returns the size of the vertical bar in the center of the screen that represents the "dead zone" of h...
bool get_force_mouse() const
Returns the current setting of the force_mouse flag.
void set_vertical_dead_zone(PN_stdfloat zone)
Sets the size of the horizontal bar in the center of the screen that represents the "dead zone" of ve...
bool get_stop_this_frame() const
Returns the current setting of the stop_this_frame flag.
void set_horizontal_ramp_down_time(PN_stdfloat ramp_down_time)
Sets the amount of time, in seconds, it takes between the time a left or right arrow key is released ...
void set_reverse_speed(PN_stdfloat speed)
Sets the speed of full reverse motion, when the mouse is at the very bottom of the window.
bool get_ignore_mouse() const
Returns the current setting of the ignore_mouse flag.
PN_stdfloat get_horizontal_ramp_down_time() const
Returns the amount of time, in seconds, it takes between the time a left or right arrow key is releas...
void set_hpr(const LVecBase3 &hpr)
Directly sets the driver's orientation.
void set_horizontal_ramp_up_time(PN_stdfloat ramp_up_time)
Sets the amount of time, in seconds, it takes between the time a left or right arrow key is pressed a...
PN_stdfloat get_rotate_speed() const
Returns the maximum rate at which the user can rotate left or right, when the mouse is at the very ed...
const LPoint3 & get_pos() const
Returns the driver's position.
void set_stop_this_frame(bool stop_this_frame)
If stop_this_frame is true, the next time the frame is computed no motion will be allowed,...
void set_forward_speed(PN_stdfloat speed)
Sets the speed of full forward motion, when the mouse is at the very top of the window.
const LVecBase3 & get_hpr() const
Returns the driver's orientation.
PN_stdfloat get_vertical_ramp_up_time() const
Returns the amount of time, in seconds, it takes between the time an up or down arrow key is pressed ...
void set_force_mouse(bool force_mouse)
Changes the state of the force_mouse flag.
PN_stdfloat get_vertical_ramp_down_time() const
Returns the amount of time, in seconds, it takes between the time an up or down arrow key is released...
void set_vertical_ramp_down_time(PN_stdfloat ramp_down_time)
Sets the amount of time, in seconds, it takes between the time an up or down arrow key is released an...
PN_stdfloat get_forward_speed() const
Returns the speed of full forward motion, when the mouse is at the very top of the window.
void set_vertical_ramp_up_time(PN_stdfloat ramp_up_time)
Sets the amount of time, in seconds, it takes between the time an up or down arrow key is pressed and...