00001 // Copyright (C) 2004-2007 University of Louisiana at Lafayette 00002 // Authors: Suresh Golconda, Nitin, Arun Pratap, Christopher Mire 00003 00004 #ifndef CAJUN_DRAW_OBSTACLES_H 00005 #define CAJUN_DRAW_OBSTACLES_H 00006 00007 // #define BOX 0 00008 // #define SPHERE 1 00009 // #define CYLINDER 2 00010 // #define WHEEL 3 00011 00012 #define NUM_OBJECTS 100 00013 00014 #include <vector> 00015 #include "queue_generator.H" 00016 #include "model.H" 00017 #include "world_state.H" 00018 #include "component_interface.H" 00019 #include "conf.H" 00020 00021 namespace cajun 00022 { 00023 class draw_obstacles_t : public component_interface_t 00024 { 00025 private: 00026 Model *m_pWheel; 00027 Model *m_pVehicle; 00028 std::vector<obstacle_data_t> m_obstacle_list; 00029 obstacle_data_t m_obstacle_data; 00030 int m_object_lookup[NUM_OBJECTS];//dynamic 00031 unsigned m_list_counter; 00032 int m_viz_mode; 00033 double m_object_rotation[16]; 00034 00035 unsigned m_qid; 00036 world_state_t *m_ws; 00037 00038 bool m_display_vel; 00039 bool m_display_id; 00040 public: 00041 draw_obstacles_t (double cbviz_origin_[3], unsigned qid_, 00042 world_state_t *ws_, conf_t &viz_conf_, 00043 int viz_mode_); 00044 void init_data (); 00045 void update_data (double bot_pos_[3]); 00046 void display (double cbviz_origin_[3]); 00047 void toggle_display () { m_display = ! m_display; } 00048 }; 00049 }; 00050 #endif