00001 00002 /* 00003 ** Mesh Converter 00004 ** Copyright (C) 2008 Damien Rohmer 00005 ** 00006 ** This program is free software: you can redistribute it and/or modify 00007 ** it under the terms of the GNU General Public License as published by 00008 ** the Free Software Foundation, either version 3 of the License, or 00009 ** (at your option) any later version. 00010 ** 00011 ** This program is distributed in the hope that it will be useful, 00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 ** GNU General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU General Public License 00017 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 00021 #ifndef MC_MESH_FAST_DRAW_HPP_ 00022 #define MC_MESH_FAST_DRAW_HPP_ 00023 00024 #include <MC_int_vector.hpp> 00025 #include <MC_double_vector.hpp> 00026 00027 #include <vector> 00028 #include <set> 00029 00030 00031 namespace mesh_conv 00032 { 00033 00034 class MC_connectivity_index; 00035 class MC_v3d_vector; 00036 class MC_mesh_index_vector; 00037 class MC_mesh_index_vector_draw; 00038 00040 class MC_mesh_fast_draw 00041 { 00042 00043 public: 00044 00045 //*********************************************// 00046 //*********************************************// 00047 // CONSTRUCTORS 00048 //*********************************************// 00049 //*********************************************// 00050 00052 MC_mesh_fast_draw(); 00054 MC_mesh_fast_draw(const MC_connectivity_index& connectivity,const MC_v3d_vector& point_set); 00056 MC_mesh_fast_draw(const MC_mesh_index_vector& mesh); 00058 MC_mesh_fast_draw(const MC_mesh_index_vector_draw& mesh); 00059 00060 00062 ~MC_mesh_fast_draw(); 00063 00064 00065 //*********************************************// 00066 //*********************************************// 00067 // get internal 00068 //*********************************************// 00069 //*********************************************// 00070 00072 const MC_double_vector& point_set() const; 00074 MC_double_vector& point_set(); 00076 const MC_double_vector& color() const; 00078 const MC_double_vector& texture() const; 00080 const MC_double_vector& normal() const; 00082 MC_double_vector& normal(); 00084 const std::map <int,MC_int_vector>& connectivity() const; 00085 00086 00087 //*********************************************// 00088 //*********************************************// 00089 // set from v3d class to continuous internal storage 00090 //*********************************************// 00091 //*********************************************// 00092 00094 MC_mesh_fast_draw& set_point_set(const MC_v3d_vector& point_set); 00096 MC_mesh_fast_draw& set_connectivity(const MC_connectivity_index& connectivity); 00098 MC_mesh_fast_draw& set_color(const MC_v3d_vector& color); 00100 MC_mesh_fast_draw& set_normal(const MC_v3d_vector& normal); 00102 MC_mesh_fast_draw& set_texture(const MC_v3d_vector& texture); 00103 00104 00105 private: 00106 00108 MC_double_vector point_set_mesh; 00110 MC_double_vector color_mesh; 00112 MC_double_vector texture_mesh; 00114 MC_double_vector normal_mesh; 00115 00119 std::map <int,MC_int_vector> connectivity_mesh; 00120 00121 }; 00122 } 00123 00124 #endif
1.6.1