From a2c06f93f4a3491113f965282b7970f7644c38e2 Mon Sep 17 00:00:00 2001 From: granzuglia Date: Wed, 19 Dec 2007 14:06:06 +0000 Subject: [PATCH] version with inverted x --- wrap/io_trimesh/export_idtf.h | 4 ++-- wrap/io_trimesh/export_u3d.h | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wrap/io_trimesh/export_idtf.h b/wrap/io_trimesh/export_idtf.h index 38284ca2..0802baad 100644 --- a/wrap/io_trimesh/export_idtf.h +++ b/wrap/io_trimesh/export_idtf.h @@ -244,7 +244,7 @@ typedef typename SaveMeshType::CoordType CoordType; idtf.write(3,"MODEL_POSITION_LIST {"); vcg::tri::UpdateBounding::Box(m); //ScalarType diag = m.bbox.Diag(); - CoordType center = m.bbox.Center(); + //CoordType center = m.bbox.Center(); for(ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit) { CoordType tmp = vit->P();// - center);// /diag; @@ -260,7 +260,7 @@ typedef typename SaveMeshType::CoordType CoordType; for(unsigned int ii = 0;ii < 3;++ii) { fitn->N().Normalize(); - idtf.write(4,TextUtility::nmbToStr(fitn->N().X()) + " " + + idtf.write(4,TextUtility::nmbToStr(-fitn->N().X()) + " " + TextUtility::nmbToStr(fitn->N().Z()) + " " + TextUtility::nmbToStr(fitn->N().Y())); } diff --git a/wrap/io_trimesh/export_u3d.h b/wrap/io_trimesh/export_u3d.h index cdb8c567..082b829f 100644 --- a/wrap/io_trimesh/export_u3d.h +++ b/wrap/io_trimesh/export_u3d.h @@ -242,6 +242,9 @@ private: QStringList file_trim; QtUtilityFunctions::splitFilePath(u3df,file_trim); std::string u3d_final = QtUtilityFunctions::fileNameFromTrimmedPath(file_trim).toStdString(); + latex.write(0,"\\documentclass[a4paper]{article}"); + latex.write(0,"\\usepackage[3D]{movie15}"); + latex.write(0,"\\usepackage[UKenglish]{babel}"); latex.write(0,"\\begin{document}"); latex.write(0,"\\includemovie["); latex.write(1,"poster,"); @@ -259,7 +262,7 @@ private: ", 3Dcoo=" + TextUtility::nmbToStr(-cam->_obj_pos.X()) + " " + TextUtility::nmbToStr(cam->_obj_pos.Z()) + " " + TextUtility::nmbToStr(cam->_obj_pos.Y()) + ","; latex.write(1,cam_string); } - latex.write(1,"3Dlights=File,"); + latex.write(1,"3Dlights=CAD,"); latex.write(0,"]{\\linewidth}{\\linewidth}{" + u3d_final + "}"); latex.write(0,"\\end{document}"); }