Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DriveInterface Class Reference

#include <driveInterface.h>

Inheritance diagram for DriveInterface:

DataNode PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual void do_transmit_data (const DataNodeTransmit &input, DataNodeTransmit &output)

Private Member Functions

 ~DriveInterface ()
INLINE void set_forward_speed (float speed)
INLINE float get_forward_speed () const
INLINE void set_reverse_speed (float speed)
INLINE float get_reverse_speed () const
INLINE void set_rotate_speed (float speed)
INLINE float get_rotate_speed () const
INLINE void set_vertical_dead_zone (float zone)
INLINE float get_vertical_dead_zone () const
INLINE void set_horizontal_dead_zone (float zone)
INLINE float get_horizontal_dead_zone () const
INLINE void set_vertical_ramp_up_time (float ramp_up_time)
INLINE float get_vertical_ramp_up_time () const
INLINE void set_vertical_ramp_down_time (float ramp_down_time)
INLINE float get_vertical_ramp_down_time () const
INLINE void set_horizontal_ramp_up_time (float ramp_up_time)
INLINE float get_horizontal_ramp_up_time () const
INLINE void set_horizontal_ramp_down_time (float ramp_down_time)
INLINE float get_horizontal_ramp_down_time () const
INLINE float get_speed () const
INLINE float get_rot_speed () const
void reset ()
INLINE const LPoint3f & get_pos () const
 **** Translation ****

INLINE float get_x () const
INLINE float get_y () const
INLINE float get_z () const
INLINE void set_pos (const LVecBase3f &vec)
INLINE void set_pos (float x, float y, float z)
INLINE void set_x (float x)
INLINE void set_y (float y)
INLINE void set_z (float z)
INLINE const LVecBase3f & get_hpr () const
 **** Rotation ****

INLINE float get_h () const
INLINE float get_p () const
INLINE float get_r () const
INLINE void set_hpr (const LVecBase3f &hpr)
INLINE void set_hpr (float h, float p, float r)
INLINE void set_h (float h)
INLINE void set_p (float p)
INLINE void set_r (float r)
void set_force_roll (float force_roll)
INLINE void set_ignore_mouse (bool ignore_mouse)
INLINE bool get_ignore_mouse () const
INLINE void set_force_mouse (bool force_mouse)
INLINE bool get_force_mouse () const
INLINE void set_stop_this_frame (bool stop_this_frame)
INLINE bool get_stop_this_frame () const
void set_mat (const LMatrix4f &mat)
const LMatrix4f & get_mat ()
void force_dgraph ()
void apply (double x, double y, bool any_button)
 PT (EventStoreTransform) _transform
 PT (EventStoreVec3) _velocity

Private Attributes

PUBLISHED __pad0__: DriveInterface(const string &name = "")
float _forward_speed
float _reverse_speed
float _rotate_speed
float _vertical_dead_zone
float _horizontal_dead_zone
float _vertical_center
float _horizontal_center
float _vertical_ramp_up_time
float _vertical_ramp_down_time
float _horizontal_ramp_up_time
float _horizontal_ramp_down_time
float _speed
float _rot_speed
LPoint3f _xyz
LVecBase3f _hpr
LVector3f _vel
bool _ignore_mouse
bool _force_mouse
bool _stop_this_frame
LMatrix4f _mat
ModifierButtons _mods
KeyHeld _up_arrow
KeyHeld _down_arrow
KeyHeld _left_arrow
KeyHeld _right_arrow
int _xy_input
int _button_events_input
int _transform_output
int _velocity_output

Static Private Attributes

const float _hpr_quantize = 0.001
TypeHandle _type_handle

Constructor & Destructor Documentation

DriveInterface::~DriveInterface  )  [private]
 

Definition at line 157 of file driveInterface.cxx.


Member Function Documentation

void DriveInterface::apply double  x,
double  y,
bool  any_button
[private]
 

Definition at line 244 of file driveInterface.cxx.

References _down_arrow, DriveInterface::KeyHeld::_effect, _force_mouse, _forward_speed, _horizontal_center, _horizontal_dead_zone, _horizontal_ramp_down_time, _horizontal_ramp_up_time, _hpr, _left_arrow, _reverse_speed, _right_arrow, _rot_speed, _rotate_speed, _speed, _stop_this_frame, _up_arrow, _vel, _vertical_center, _vertical_dead_zone, _vertical_ramp_down_time, _vertical_ramp_up_time, _xyz, CS_yup_left, CS_yup_right, CS_zup_left, CS_zup_right, distance(), ClockObject::get_dt(), DriveInterface::KeyHeld::get_effect(), ClockObject::get_global_clock(), x, and y.

Referenced by do_transmit_data().

void DriveInterface::do_transmit_data const DataNodeTransmit input,
DataNodeTransmit output
[protected, virtual]
 

Reimplemented from DataNode.

Definition at line 402 of file driveInterface.cxx.

References ButtonEvent::_button, _button_events_input, _down_arrow, _hpr, _ignore_mouse, _left_arrow, _mods, _right_arrow, _transform_output, ButtonEvent::_type, _up_arrow, _vel, _velocity_output, _xy_input, _xyz, ModifierButtons::add_event(), apply(), DCAST_INTO_V, KeyboardButton::down(), ButtonEventList::get_event(), ButtonEventList::get_num_events(), EventStoreValue< Type >::get_value(), input, ModifierButtons::is_any_down(), KeyboardButton::left(), p, KeyboardButton::right(), DataNodeTransmit::set_data(), DriveInterface::KeyHeld::set_key(), ButtonEvent::T_down, ButtonEvent::T_keystroke, KeyboardButton::up(), x, and y.

void DriveInterface::force_dgraph  )  [private]
 

Definition at line 221 of file driveInterface.cxx.

References _hpr, _transform_output, _vel, _velocity_output, _xyz, DataGraphTraverser::collect_leftovers(), DataNode::get_num_outputs(), PandaNode::output(), DataNodeTransmit::reserve(), DataNodeTransmit::set_data(), and DataGraphTraverser::traverse_below().

virtual TypeHandle DriveInterface::force_init_type void   )  [inline, virtual]
 

Reimplemented from DataNode.

Definition at line 197 of file driveInterface.h.

References DataNode::get_class_type(), and DataNode::init_type().

TypeHandle DriveInterface::get_class_type void   )  [inline, static]
 

Reimplemented from DataNode.

Definition at line 186 of file driveInterface.h.

INLINE bool DriveInterface::get_force_mouse  )  const [private]
 

INLINE float DriveInterface::get_forward_speed  )  const [private]
 

INLINE float DriveInterface::get_h  )  const [private]
 

INLINE float DriveInterface::get_horizontal_dead_zone  )  const [private]
 

INLINE float DriveInterface::get_horizontal_ramp_down_time  )  const [private]
 

INLINE float DriveInterface::get_horizontal_ramp_up_time  )  const [private]
 

INLINE const LVecBase3f& DriveInterface::get_hpr  )  const [private]
 

**** Rotation ****

INLINE bool DriveInterface::get_ignore_mouse  )  const [private]
 

const LMatrix4f & DriveInterface::get_mat  )  [private]
 

Definition at line 206 of file driveInterface.cxx.

References _hpr, _mat, _xyz, and compose_matrix().

INLINE float DriveInterface::get_p  )  const [private]
 

INLINE const LPoint3f& DriveInterface::get_pos  )  const [private]
 

**** Translation ****

INLINE float DriveInterface::get_r  )  const [private]
 

INLINE float DriveInterface::get_reverse_speed  )  const [private]
 

INLINE float DriveInterface::get_rot_speed  )  const [private]
 

INLINE float DriveInterface::get_rotate_speed  )  const [private]
 

INLINE float DriveInterface::get_speed  )  const [private]
 

INLINE bool DriveInterface::get_stop_this_frame  )  const [private]
 

virtual TypeHandle DriveInterface::get_type void   )  const [inline, virtual]
 

Reimplemented from DataNode.

Definition at line 194 of file driveInterface.h.

References DataNode::get_class_type().

INLINE float DriveInterface::get_vertical_dead_zone  )  const [private]
 

INLINE float DriveInterface::get_vertical_ramp_down_time  )  const [private]
 

INLINE float DriveInterface::get_vertical_ramp_up_time  )  const [private]
 

INLINE float DriveInterface::get_x  )  const [private]
 

INLINE float DriveInterface::get_y  )  const [private]
 

INLINE float DriveInterface::get_z  )  const [private]
 

void DriveInterface::init_type void   )  [inline, static]
 

Reimplemented from DataNode.

Definition at line 189 of file driveInterface.h.

References DataNode::get_class_type(), DataNode::init_type(), and register_type().

Referenced by ConfigureFn().

DriveInterface::PT EventStoreVec3   )  [private]
 

DriveInterface::PT EventStoreTransform   )  [private]
 

void DriveInterface::reset  )  [private]
 

Definition at line 167 of file driveInterface.cxx.

References _down_arrow, _hpr, _left_arrow, _mods, _right_arrow, _up_arrow, _xyz, ModifierButtons::all_buttons_up(), and DriveInterface::KeyHeld::clear().

INLINE void DriveInterface::set_force_mouse bool  force_mouse  )  [private]
 

void DriveInterface::set_force_roll float  force_roll  )  [private]
 

Definition at line 186 of file driveInterface.cxx.

INLINE void DriveInterface::set_forward_speed float  speed  )  [private]
 

INLINE void DriveInterface::set_h float  h  )  [private]
 

INLINE void DriveInterface::set_horizontal_dead_zone float  zone  )  [private]
 

INLINE void DriveInterface::set_horizontal_ramp_down_time float  ramp_down_time  )  [private]
 

INLINE void DriveInterface::set_horizontal_ramp_up_time float  ramp_up_time  )  [private]
 

INLINE void DriveInterface::set_hpr float  h,
float  p,
float  r
[private]
 

INLINE void DriveInterface::set_hpr const LVecBase3f &  hpr  )  [private]
 

INLINE void DriveInterface::set_ignore_mouse bool  ignore_mouse  )  [private]
 

void DriveInterface::set_mat const LMatrix4f &  mat  )  [private]
 

Definition at line 195 of file driveInterface.cxx.

References _hpr, _xyz, decompose_matrix(), and scale.

INLINE void DriveInterface::set_p float  p  )  [private]
 

INLINE void DriveInterface::set_pos float  x,
float  y,
float  z
[private]
 

INLINE void DriveInterface::set_pos const LVecBase3f &  vec  )  [private]
 

INLINE void DriveInterface::set_r float  r  )  [private]
 

INLINE void DriveInterface::set_reverse_speed float  speed  )  [private]
 

INLINE void DriveInterface::set_rotate_speed float  speed  )  [private]
 

INLINE void DriveInterface::set_stop_this_frame bool  stop_this_frame  )  [private]
 

INLINE void DriveInterface::set_vertical_dead_zone float  zone  )  [private]
 

INLINE void DriveInterface::set_vertical_ramp_down_time float  ramp_down_time  )  [private]
 

INLINE void DriveInterface::set_vertical_ramp_up_time float  ramp_up_time  )  [private]
 

INLINE void DriveInterface::set_x float  x  )  [private]
 

INLINE void DriveInterface::set_y float  y  )  [private]
 

INLINE void DriveInterface::set_z float  z  )  [private]
 


Member Data Documentation

PUBLISHED DriveInterface::__pad0__ [private]
 

Reimplemented from DataNode.

Definition at line 40 of file driveInterface.h.

int DriveInterface::_button_events_input [private]
 

Definition at line 169 of file driveInterface.h.

Referenced by do_transmit_data().

KeyHeld DriveInterface::_down_arrow [private]
 

Definition at line 157 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), and reset().

bool DriveInterface::_force_mouse [private]
 

Definition at line 133 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_forward_speed [private]
 

Definition at line 111 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_horizontal_center [private]
 

Definition at line 117 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_horizontal_dead_zone [private]
 

Definition at line 115 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_horizontal_ramp_down_time [private]
 

Definition at line 124 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_horizontal_ramp_up_time [private]
 

Definition at line 123 of file driveInterface.h.

Referenced by apply().

LVecBase3f DriveInterface::_hpr [private]
 

Definition at line 130 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), force_dgraph(), get_mat(), reset(), and set_mat().

const float DriveInterface::_hpr_quantize = 0.001 [static, private]
 

Definition at line 34 of file driveInterface.cxx.

bool DriveInterface::_ignore_mouse [private]
 

Definition at line 132 of file driveInterface.h.

Referenced by do_transmit_data().

KeyHeld DriveInterface::_left_arrow [private]
 

Definition at line 158 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), and reset().

LMatrix4f DriveInterface::_mat [private]
 

Definition at line 137 of file driveInterface.h.

Referenced by get_mat().

ModifierButtons DriveInterface::_mods [private]
 

Definition at line 140 of file driveInterface.h.

Referenced by do_transmit_data(), and reset().

float DriveInterface::_reverse_speed [private]
 

Definition at line 112 of file driveInterface.h.

Referenced by apply().

KeyHeld DriveInterface::_right_arrow [private]
 

Definition at line 158 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), and reset().

float DriveInterface::_rot_speed [private]
 

Definition at line 127 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_rotate_speed [private]
 

Definition at line 113 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_speed [private]
 

Definition at line 126 of file driveInterface.h.

Referenced by apply().

bool DriveInterface::_stop_this_frame [private]
 

Definition at line 134 of file driveInterface.h.

Referenced by apply().

int DriveInterface::_transform_output [private]
 

Definition at line 172 of file driveInterface.h.

Referenced by do_transmit_data(), and force_dgraph().

TypeHandle DriveInterface::_type_handle [static, private]
 

Reimplemented from DataNode.

Definition at line 33 of file driveInterface.cxx.

KeyHeld DriveInterface::_up_arrow [private]
 

Definition at line 157 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), and reset().

LVector3f DriveInterface::_vel [private]
 

Definition at line 131 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), and force_dgraph().

int DriveInterface::_velocity_output [private]
 

Definition at line 173 of file driveInterface.h.

Referenced by do_transmit_data(), and force_dgraph().

float DriveInterface::_vertical_center [private]
 

Definition at line 116 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_vertical_dead_zone [private]
 

Definition at line 114 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_vertical_ramp_down_time [private]
 

Definition at line 122 of file driveInterface.h.

Referenced by apply().

float DriveInterface::_vertical_ramp_up_time [private]
 

Definition at line 121 of file driveInterface.h.

Referenced by apply().

int DriveInterface::_xy_input [private]
 

Definition at line 168 of file driveInterface.h.

Referenced by do_transmit_data().

LPoint3f DriveInterface::_xyz [private]
 

Definition at line 129 of file driveInterface.h.

Referenced by apply(), do_transmit_data(), force_dgraph(), get_mat(), reset(), and set_mat().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:55 2003 for Panda by doxygen1.3