From 7a52cf8cb3a1a4d8f7b595606d13e5f1179ad9dd Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 26 Nov 2007 20:38:54 +0000 Subject: [PATCH] gcc typenames --- wrap/io_trimesh/export_idtf.h | 26 ++++++++++++++++++-------- wrap/io_trimesh/export_u3d.h | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/wrap/io_trimesh/export_idtf.h b/wrap/io_trimesh/export_idtf.h index 31e48451..dce57a80 100644 --- a/wrap/io_trimesh/export_idtf.h +++ b/wrap/io_trimesh/export_idtf.h @@ -55,6 +55,16 @@ template class ExporterIDTF { public: +typedef typename SaveMeshType::VertexPointer VertexPointer; +typedef typename SaveMeshType::ScalarType ScalarType; +typedef typename SaveMeshType::VertexType VertexType; +typedef typename SaveMeshType::FaceType FaceType; +typedef typename SaveMeshType::ConstVertexIterator ConstVertexIterator; +typedef typename SaveMeshType::VertexIterator VertexIterator; +typedef typename SaveMeshType::FaceIterator FaceIterator; +typedef typename SaveMeshType::ConstFaceIterator ConstFaceIterator; +typedef typename SaveMeshType::CoordType CoordType; + enum IDTFError { E_NOERROR // 0 @@ -137,7 +147,7 @@ public: idtf.write(4,"}"); idtf.write(3,"}"); idtf.write(3,"MESH_FACE_POSITION_LIST {"); - for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) + for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) { idtf.write(4,TextUtility::nmbToStr(fit->V(0) - &(*m.vert.begin())) + " " + TextUtility::nmbToStr(fit->V(1) - &(*m.vert.begin())) + " " + @@ -147,7 +157,7 @@ public: idtf.write(3,"MESH_FACE_NORMAL_LIST {"); unsigned int nn = 0; - for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) + for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) { idtf.write(4,TextUtility::nmbToStr(nn) + " " + TextUtility::nmbToStr(nn + 1) + " " + @@ -160,7 +170,7 @@ public: { idtf.write(3,"MESH_FACE_TEXTURE_COORD_LIST {"); unsigned int nn = 0; - for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) + for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) { idtf.write(4,"FACE " + TextUtility::nmbToStr(nn) + "{"); idtf.write(5,"TEXTURE_LAYER 0 TEX_COORD: " + TextUtility::nmbToStr(nn) + " " + @@ -172,14 +182,14 @@ public: } idtf.write(3,"MESH_FACE_SHADING_LIST {"); - for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) + for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit) { idtf.write(4,TextUtility::nmbToStr(0)); } idtf.write(3,"}"); idtf.write(3,"MODEL_POSITION_LIST {"); - for(SaveMeshType::ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit) + for(ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit) { idtf.write(4,TextUtility::nmbToStr(vit->P().X()) + " " + TextUtility::nmbToStr(vit->P().Y()) + " " + @@ -188,7 +198,7 @@ public: idtf.write(3,"}"); idtf.write(3,"MODEL_NORMAL_LIST {"); - for(SaveMeshType::FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn) + for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn) { for(unsigned int ii = 0;ii < 3;++ii) { @@ -202,7 +212,7 @@ public: if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD) { idtf.write(3,"MODEL_TEXTURE_COORD_LIST {"); - for(SaveMeshType::FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn) + for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn) { for(unsigned int ii = 0;ii < 3;++ii) { @@ -216,7 +226,7 @@ public: idtf.write(2,"}"); idtf.write(1,"}"); idtf.write(0,"}"); - return IDTFError::E_NOERROR; + return E_NOERROR; } static int GetExportMaskCapability() diff --git a/wrap/io_trimesh/export_u3d.h b/wrap/io_trimesh/export_u3d.h index 68b86dc9..6c6bf09a 100644 --- a/wrap/io_trimesh/export_u3d.h +++ b/wrap/io_trimesh/export_u3d.h @@ -102,7 +102,7 @@ private: latex.write(1,"label=" + file.toStdString() + ","); latex.write(1,"text=(" + u3df.toStdString() + "),"); std::string cam_string; - Movie15Parameters::CameraParameters* cam = mov_par._campar; + typename Movie15Parameters::CameraParameters* cam = mov_par._campar; cam_string = cam_string + "3Daac=" + TextUtility::nmbToStr(cam->_cam_fov_angle) + ", 3Droll=" + TextUtility::nmbToStr(cam->_cam_roll_angle) + ", 3Dc2c=" + TextUtility::nmbToStr(cam->_obj_to_cam_dir.X()) + " " + TextUtility::nmbToStr(cam->_obj_to_cam_dir.Y()) + " " + TextUtility::nmbToStr(cam->_obj_to_cam_dir.Z()) +