Mesh_object_loader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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