15 #ifndef DRIVEINTERFACE_H 16 #define DRIVEINTERFACE_H 18 #include "pandabase.h" 20 #include "mouseInterfaceNode.h" 21 #include "modifierButtons.h" 23 #include "linmath_events.h" 24 #include "transformState.h" 39 INLINE
void set_forward_speed(PN_stdfloat speed);
40 INLINE PN_stdfloat get_forward_speed()
const;
41 INLINE
void set_reverse_speed(PN_stdfloat speed);
42 INLINE PN_stdfloat get_reverse_speed()
const;
43 INLINE
void set_rotate_speed(PN_stdfloat speed);
44 INLINE PN_stdfloat get_rotate_speed()
const;
45 INLINE
void set_vertical_dead_zone(PN_stdfloat zone);
46 INLINE PN_stdfloat get_vertical_dead_zone()
const;
47 INLINE
void set_horizontal_dead_zone(PN_stdfloat zone);
48 INLINE PN_stdfloat get_horizontal_dead_zone()
const;
50 INLINE
void set_vertical_ramp_up_time(PN_stdfloat ramp_up_time);
51 INLINE PN_stdfloat get_vertical_ramp_up_time()
const;
52 INLINE
void set_vertical_ramp_down_time(PN_stdfloat ramp_down_time);
53 INLINE PN_stdfloat get_vertical_ramp_down_time()
const;
54 INLINE
void set_horizontal_ramp_up_time(PN_stdfloat ramp_up_time);
55 INLINE PN_stdfloat get_horizontal_ramp_up_time()
const;
56 INLINE
void set_horizontal_ramp_down_time(PN_stdfloat ramp_down_time);
57 INLINE PN_stdfloat get_horizontal_ramp_down_time()
const;
59 INLINE PN_stdfloat get_speed()
const;
60 INLINE PN_stdfloat get_rot_speed()
const;
66 INLINE
const LPoint3 &get_pos()
const;
67 INLINE PN_stdfloat get_x()
const;
68 INLINE PN_stdfloat get_y()
const;
69 INLINE PN_stdfloat get_z()
const;
70 INLINE
void set_pos(
const LVecBase3 &vec);
71 INLINE
void set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
72 INLINE
void set_x(PN_stdfloat x);
73 INLINE
void set_y(PN_stdfloat y);
74 INLINE
void set_z(PN_stdfloat z);
79 INLINE PN_stdfloat get_h()
const;
80 INLINE PN_stdfloat get_p()
const;
81 INLINE PN_stdfloat get_r()
const;
82 INLINE
void set_hpr(
const LVecBase3 &hpr);
83 INLINE
void set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r);
84 INLINE
void set_h(PN_stdfloat h);
85 INLINE
void set_p(PN_stdfloat p);
86 INLINE
void set_r(PN_stdfloat r);
88 void set_force_roll(PN_stdfloat force_roll);
90 INLINE
void set_ignore_mouse(
bool ignore_mouse);
91 INLINE
bool get_ignore_mouse()
const;
93 INLINE
void set_force_mouse(
bool force_mouse);
94 INLINE
bool get_force_mouse()
const;
96 INLINE
void set_stop_this_frame(
bool stop_this_frame);
97 INLINE
bool get_stop_this_frame()
const;
105 void apply(
double x,
double y,
bool any_button);
107 PN_stdfloat _forward_speed;
108 PN_stdfloat _reverse_speed;
109 PN_stdfloat _rotate_speed;
110 PN_stdfloat _vertical_dead_zone;
111 PN_stdfloat _horizontal_dead_zone;
112 PN_stdfloat _vertical_center;
113 PN_stdfloat _horizontal_center;
117 PN_stdfloat _vertical_ramp_up_time;
118 PN_stdfloat _vertical_ramp_down_time;
119 PN_stdfloat _horizontal_ramp_up_time;
120 PN_stdfloat _horizontal_ramp_down_time;
123 PN_stdfloat _rot_speed;
130 bool _stop_this_frame;
140 PN_stdfloat get_effect(PN_stdfloat ramp_up_time, PN_stdfloat ramp_down_time);
141 void set_key(
bool down);
143 bool operator < (
const KeyHeld &other)
const;
147 double _changed_time;
148 PN_stdfloat _effect_at_change;
150 KeyHeld _up_arrow, _down_arrow;
151 KeyHeld _left_arrow, _right_arrow;
163 int _button_events_input;
166 int _transform_output;
167 int _velocity_output;
169 CPT(TransformState) _transform;
177 static const PN_stdfloat _hpr_quantize;
183 static void init_type() {
184 MouseInterfaceNode::init_type();
185 register_type(_type_handle,
"DriveInterface",
186 MouseInterfaceNode::get_class_type());
189 return get_class_type();
191 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
197 #include "driveInterface.I" This is the base class for all three-component vectors and points.
This is a TFormer, similar to Trackball, that moves around a transform matrix in response to mouse in...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
A handy class object for storing simple values (like integers or strings) passed along with an Event ...
This is a 4-by-4 transform matrix.
This is the base class for some classes that monitor the mouse and keyboard input and perform some ac...
TypeHandle is the identifier used to differentiate C++ class types.
Encapsulates the data generated from (or sent into) any particular DataNode.
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...