47 #include "../qglviewer.h"
50 #include <QMessageBox>
57 _xmin=_xmax=_ymin=_ymax=_zmin=_zmax = 0.0 ;
62 const vector<PtrPrimitive>& primitive_tab,
67 if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
68 QMessageBox::warning(NULL, QGLViewer::tr(
"Exporter error",
"Message box window title"), QGLViewer::tr(
"Unable to open file %1.").arg(filename));
72 QTextStream out(&file);
76 unsigned int N = primitive_tab.size()/200 + 1 ;
78 for(
unsigned int i=0;i<primitive_tab.size();++i)
80 Point *p =
dynamic_cast<Point *
>(primitive_tab[i]) ;
84 if(p != NULL) spewPoint(p,out) ;
85 if(s != NULL) spewSegment(s,out) ;
86 if(P != NULL) spewPolygone(P,out) ;
89 vparams.
progress(i/(
float)primitive_tab.size(),QGLViewer::tr(
"Exporting to file %1").arg(filename)) ;