00001 // Copyright (C) 2006 Christopher Mire 00002 // Copyright (C) 2006 University of Louisiana at Lafayette 00003 // Authors: Christopher Mire 00004 00005 #ifndef CAJUN_DRAW_STATIC_SCANGP_H 00006 #define CAJUN_DRAW_STATIC_SCANGP_H 00007 00008 #include "data_queue.H" 00009 #include "conf.H" 00010 #include "component_interface.H" 00011 #include <vector> 00012 00013 #ifdef VR_JUGGLER 00014 #include <vrj/Draw/OGL/GlContextData.h> 00015 #endif 00016 namespace cajun 00017 { 00018 class draw_static_scangp_t : public component_interface_t 00019 { 00020 public: 00021 draw_static_scangp_t (conf_t &conf, char const *static_file); 00022 virtual ~draw_static_scangp_t (); 00023 void update_data (double bot_pos_[3]); 00024 void display (double bot_pos[3]); 00025 void toggle_display (); 00026 void flush_buffer (); 00027 void init_data (); 00028 void get_origin (double origin_[3]); 00029 private: 00030 struct point_t 00031 { 00032 float x, y, z; 00033 unsigned char r, g, b; 00034 }; 00035 00036 #define DL_MAX_SIZE 500000 00037 00038 std::vector<point_t> vertices; 00039 #ifdef VR_JUGGLER 00040 vrj::GlContextData<GLuint> scangp_listname; 00041 // int scangp_listname; 00042 #else 00043 GLuint scangp_listname; 00044 #endif 00045 char m_static_file[200]; 00046 unsigned m_num_dl; 00047 unsigned *m_dl_indices; 00048 }; 00049 } 00050 #endif