00001
00002
00003
00004 #ifndef CAJUN_GLUT_INTERFACE_H
00005 #define CAJUN_GLUT_INTERFACE_H
00006
00007 #include "interface.H"
00008 #include "cbviz_util.H"
00009 #include <vector>
00010 #include <glui.h>
00011
00012 namespace cajun
00013 {
00014 class glut_interface_t : public graphic_interface_t
00015 {
00016 public:
00017 ~glut_interface_t ();
00018 void register_graphics (drawing_t *graphics);
00019 void init_interface (int argc, char **argv, char const *terrain_model,
00020 char const *sky_model, char const *conf_filename);
00021 void start_interface ();
00022 void set_controlKey_index ();
00023 static void update_data_callback ();
00024 static void update_data_callback2 ();
00025 static void update_data_callback3 ();
00026 static void draw_callback ();
00027 static void draw_callback_2 ();
00028 static void draw_callback_3 ();
00029 static void normalKey_callback (unsigned char key,
00030 int x, int y);
00031 static void controlKey_callback (int key, int x, int y);
00032 static void mousebutton_callback (int button, int state,
00033 int x, int y);
00034 static void mousemotion_callback (int x, int y);
00035 static int get_main_window_id ();
00036 static GLUI *get_control_panel_glui ();
00037 static int get_control_panel_position ();
00038 protected:
00039 static void reshape_callback (int width, int height);
00040 static void reshape_callback2 (int width, int height);
00041 static void reshape_callback3 (int width, int height);
00042 static int m_controlKey_index [];
00043 static int m_mouseKey_index [];
00044 static int m_mouseState_index [];
00045 static int m_modifierKey_index[];
00046 static int m_window1_id;
00047 static int m_window2_id;
00048 static int m_viz_width;
00049 static int m_viz_height;
00050 static int m_vision_width;
00051 static int m_vision_height;
00052 static int m_control_panel_position;
00053 static bool m_ctrl_as_sub;
00054 static std::vector<color_node_t> m_background_color;
00055 static GLUI *m_control_panel_glui;
00056 };
00057 }
00058 #endif