diff --git a/wrap/io_trimesh/export_obj.h b/wrap/io_trimesh/export_obj.h index 12967484..4006502d 100644 --- a/wrap/io_trimesh/export_obj.h +++ b/wrap/io_trimesh/export_obj.h @@ -44,7 +44,8 @@ namespace io { typedef typename SaveMeshType::FaceIterator FaceIterator; typedef typename SaveMeshType::VertexIterator VertexIterator; typedef typename SaveMeshType::VertexType VertexType; - + typedef typename SaveMeshType::ScalarType ScalarType; + typedef typename SaveMeshType::CoordType CoordType; /* enum of all the types of error */ @@ -144,7 +145,7 @@ namespace io { //vertexs + normal VertexIterator vi; - std::map NormalVertex; + std::map NormalVertex; std::vector VertexId(m.vert.size()); int numvert = 0; int curNormalIndex = 1; @@ -193,7 +194,7 @@ namespace io { //faces + texture coords FaceIterator fi; - std::map,int> CoordIndexTexture; + std::map,int> CoordIndexTexture; unsigned int material_num = 0; int mem_index = 0; //var temporany int curTexCoordIndex = 1; @@ -288,9 +289,9 @@ namespace io { /* returns index of the texture coord */ - inline static int GetIndexVertexTexture(std::map,int> &mapTexToInt, const vcg::TexCoord2 &wt) + inline static int GetIndexVertexTexture(typename std::map,int> &mapTexToInt, const vcg::TexCoord2 &wt) { - std::map,int>::iterator iter= mapTexToInt.find(wt); + typename std::map,int>::iterator iter= mapTexToInt.find(wt); if(iter != mapTexToInt.end()) return (*iter).second; else return -1; // Old wrong version. @@ -301,9 +302,9 @@ namespace io { /* returns index of the vertex normal */ - inline static int GetIndexVertexNormal(SaveMeshType &/*m*/, std::map &mapNormToInt, const Point3f &norm ) + inline static int GetIndexVertexNormal(SaveMeshType &/*m*/, std::map &mapNormToInt, const CoordType &norm ) { - std::map::iterator iter= mapNormToInt.find(norm); + typename std::map::iterator iter= mapNormToInt.find(norm); if(iter != mapNormToInt.end()) return (*iter).second; else return -1; // Old wrong version. @@ -337,7 +338,8 @@ namespace io { adds a new index to the coordinate of Texture if it is the first time which is otherwise met not execute anything */ - inline static bool AddNewTextureCoord(std::map,int> &m, const vcg::TexCoord2 &wt,int value) + inline static bool AddNewTextureCoord(std::map,int> &m, + const typename vcg::TexCoord2 &wt,int value) { int index = m[wt]; if(index==0){m[wt]=value;return true;} @@ -348,7 +350,7 @@ namespace io { adds a new index to the normal per vertex if it is the first time which is otherwise met does not execute anything */ - inline static bool AddNewNormalVertex(std::map &m, Point3f &n ,int value) + inline static bool AddNewNormalVertex(typename std::map &m, CoordType &n ,int value) { int index = m[n]; if(index==0){m[n]=value;return true;}