00001 00005 #ifndef _SCENE_HPP_ 00006 #define _SCENE_HPP_ 00007 00008 #include <matrix3.hpp> 00009 #include <v3.hpp> 00010 #include <mesh.hpp> 00011 00012 #include <vector> 00013 00014 class glwidget; 00015 00016 class scene 00017 { 00018 public: 00019 00020 scene(); 00021 00022 00023 00025 void load_model(); 00027 void draw_scene(); 00028 00029 00030 00032 void draw_debug(cpe::mesh mesh_current); 00033 00034 00035 //debug variables 00036 void set_is_debug_mode(bool); 00037 void set_is_debug_vertex_index(bool); 00038 void set_is_debug_face_index(bool); 00039 void set_is_debug_inverted_normal(bool); 00040 void set_is_debug_vertex_point(bool); 00041 00042 //set glwidget pointer 00043 void set_glwidget(glwidget *p_widget); 00044 00045 private: 00046 00047 //*********************************// 00048 cpe::mesh mesh_0; 00049 std::vector<cpe::v3> mesh_0_normal; 00050 00051 cpe::mesh mesh_1; 00052 std::vector<cpe::v3> mesh_1_normal; 00053 00054 cpe::mesh mesh_plan; 00055 std::vector<cpe::v3> mesh_plan_normal; 00056 00057 cpe::mesh my_mesh; 00058 std::vector<cpe::v3> my_mesh_normal; 00059 //*********************************// 00060 00061 00062 00063 //*********************************// 00064 //internal methods 00065 //*********************************// 00066 void creation_damier(); 00067 void affichage_damier(); 00068 00069 bool is_debug_mode; 00070 bool is_debug_vertex_index; 00071 bool is_debug_face_index; 00072 bool is_debug_inverted_normal; 00073 bool is_debug_draw_vertex; 00074 void draw_index(const std::vector<cpe::v3>& x); 00075 void draw_index_face(const cpe::mesh& mesh,const std::vector<cpe::v3>& translate); 00076 glwidget *p_widget; 00077 00078 }; 00079 00080 #endif
1.6.3