00001 // Copyright (C) 2003, 2004 Suresh Golconda, Nitin, Arun Pratap 00002 00003 #ifndef CAJUN_COMPONENTS_H 00004 #define CAJUN_COMPONENTS_H 00005 00006 #include <ode/ode.h> 00007 #include "timer.H" 00008 00009 #define COMP_LASER 0 00010 #define COMP_RAY_SENSOR 1 00011 00012 namespace cajun 00013 { 00014 class components_t 00015 { 00016 protected: 00017 double m_global_position[3]; 00018 double m_position_on_robot[3]; 00019 double m_orientation_on_robot[3]; 00020 int m_component_type; 00021 public: 00022 virtual ~components_t () {} 00023 timer_t *m_timer; 00024 std::list<timer_t::observer_t *>::iterator m_observer_index; 00025 bool m_display_component; 00026 int get_component_type () { return m_component_type; } 00027 virtual void update_position (dBodyID carb) {} 00028 virtual void simulate_component (dBodyID carb) {} 00029 }; 00030 }; 00031 #endif