00001 // Copyright (C) 2006 University of Louisiana at Lafayette 00002 // Authors: Christopher Mire 00003 00004 #ifndef CAJUN_SCRIPT_CONTROLLER_H 00005 #define CAJUN_SCRIPT_CONTROLLER_H 00006 00007 #include "controller_interface.H" 00008 #include <fstream> 00009 00010 namespace cajun 00011 { 00012 class script_controller_t : public controller_interface_t 00013 { 00014 public: 00015 script_controller_t (); 00016 script_controller_t (dynamic_object_t *object, timer_t *timer); 00017 ~script_controller_t (); 00018 std::ifstream infile; 00019 private: 00020 class steering_observer_t : public timer_t::observer_t 00021 { 00022 public: 00023 steering_observer_t (steering_sensor_t *m, double interval_v); 00024 virtual ~steering_observer_t (); 00025 bool timeout (double currTime); 00026 private: 00027 steering_sensor_t *m_steering_sensor; 00028 double m_start_pos[3]; 00029 double m_end_pos[3]; 00030 unsigned m_goal_counter; 00031 double m_rotation[16]; 00032 double m_object_heading; 00033 double m_object_bank; 00034 double m_object_attitude; 00035 float m_prev_time; 00036 float m_pause_time; 00037 }; 00038 }; 00039 } 00040 #endif