Mesh_object_loader.h

Go to the documentation of this file.
00001 /*
00002 **    Mesh Converter
00003 **    Copyright (C) 2008 Damien Rohmer
00004 **
00005 **    This program is free software: you can redistribute it and/or modify
00006 **    it under the terms of the GNU General Public License as published by
00007 **    the Free Software Foundation, either version 3 of the License, or
00008 **    (at your option) any later version.
00009 **
00010 **   This program is distributed in the hope that it will be useful,
00011 **    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 **    GNU General Public License for more details.
00014 **
00015 **    You should have received a copy of the GNU General Public License
00016 **    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 
00020 /*
00021 ** Mesh_object_loader.h
00022 ** 
00023 ** Made by damien
00024 ** Login   <damien@ortie>
00025 ** 
00026 ** Started on  Thu Aug 28 13:56:20 2008 damien
00027 ** Last update Thu Aug 28 13:56:20 2008 damien
00028 */
00029 
00030 #ifndef         MESH_OBJECT_LOADER_H_
00031 # define        MESH_OBJECT_LOADER_H_
00032 
00033 
00034 
00035 #include <stdlib.h>
00036 #include <time.h>
00037 #include <iostream>
00038 #include <cmath>
00039 #include <string>
00040 #include <errno.h>
00041 #include <stdio.h>
00042 
00043 #include <Mesh_object.h>
00044 
00045 
00047 
00048 class Mesh_object_loader
00049 {
00050 
00051 public:
00052 
00053   
00054   //*********************************************//
00055   // CONSTRUCTORS
00056   //*********************************************//
00057   
00059   Mesh_object_loader();
00061   ~Mesh_object_loader();
00062 
00064   int load_obj_texture(const std::string& filename,Mesh_object* mesh) const;
00066   int load_obj_texture(const char* filename,Mesh_object* mesh) const;
00067 
00069 
00073   int load_collada_texture(const std::string& filename,Mesh_object* mesh,const std::string& name,const std::string& texture_source) const;
00074 
00075 
00076 
00077 
00078 private:
00079   
00081   int load_collada_mesh_texture(TiXmlNode* geometry_node,Mesh_object* mesh,const std::string& filename,const std::string& texture_source) const;
00082 
00084   std::vector <double> load_collada_float_array(TiXmlNode *mesh_source,const std::string& filename) const;
00086   std::vector <int> load_collada_int_entry(TiXmlNode* vcount_node) const;
00087 
00088 
00090   int load_polylist_texture(TiXmlNode* polylist_node,Mesh_object* mesh,const std::string& filename,const std::string& texture_source) const;
00092   int load_triangles_texture(TiXmlNode* triangles_node,Mesh_object* mesh,const std::string& filename,const std::string& texture_source) const;
00093 
00094 };
00095 
00096 
00097 
00098 
00099 #endif      /* !MESH_OBJECT_LOADER_H_ */

Generated on Mon Mar 30 16:55:54 2009 by  doxygen 1.5.6