00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __VCGLIB_EXPORTERIDTF
00025 #define __VCGLIB_EXPORTERIDTF
00026
00027
00028 #include <sstream>
00029 #include <fstream>
00030 #include <ostream>
00031 #include <string>
00032 #include <ios>
00033 #include <vcg/space/color4.h>
00034 #include <vcg/complex/trimesh/update/bounding.h>
00035 #include <wrap/io_trimesh/io_mask.h>
00036 #include <QString>
00037 #include <QFile>
00038
00039
00040
00041 class TextUtility
00042 {
00043 public:
00044 template<typename NUMERICTYPE>
00045 static std::string nmbToStr(NUMERICTYPE n)
00046 {
00047 std::stringstream ss;
00048 ss.setf(std::ios::fixed);
00049 ss << n;
00050 ss.setf(std::ios::scientific);
00051 return ss.str();
00052 }
00053 };
00054
00055 class Output_File
00056 {
00057 public:
00058 Output_File(const std::string& file)
00059 :_file()
00060 {
00061 _file.open(file.c_str(),std::ios::out);
00062 }
00063
00064 void write(unsigned int tabl,const std::string& st)
00065 {
00066 std::string tmp;
00067 for(unsigned int ii = 0;ii < tabl;++ii)
00068 tmp += '\t';
00069 _file << tmp << st << std::endl;
00070 }
00071
00072 ~Output_File()
00073 {
00074 _file.close();
00075 }
00076
00077 private:
00078 std::ofstream _file;
00079 std::string _tab;
00080 };
00081
00082 #include <QString>
00083 #include <QtGlobal>
00084 #include <fstream>
00085 #include <QImage>
00086
00087
00088 namespace vcg {
00089 namespace tri {
00090 namespace io {
00091
00092
00093 namespace QtUtilityFunctions
00094 {
00095 static void splitFilePath(const QString& filepath,QStringList& trim_path)
00096 {
00097 QString file_uniformed = filepath;
00098 file_uniformed.replace(QString("\\"),QString("/"));
00099 trim_path = file_uniformed.split("/");
00100 }
00101
00102 static QString fileNameFromTrimmedPath(const QStringList& file_path)
00103 {
00104
00105 if (file_path.size() > 0)
00106 return file_path.at(file_path.size() - 1);
00107 else
00108 return QString();
00109 }
00110
00111 static QString fileNameFromPath(const QString& filepath)
00112 {
00113 QStringList list;
00114 splitFilePath(filepath,list);
00115 return fileNameFromTrimmedPath(list);
00116 }
00117
00118 static QString pathWithoutFileName(const QString& filepath)
00119 {
00120 QString tmp(filepath);
00121 tmp.remove(fileNameFromPath(filepath));
00122 return tmp;
00123 }
00124
00125 static QString fileExtension(const QString& filepath)
00126 {
00127 QStringList trim_list;
00128 splitFilePath(filepath,trim_list);
00129 QString file = fileNameFromTrimmedPath(trim_list);
00130 trim_list = file.split(".");
00131 return trim_list.at(trim_list.size() - 1);
00132 }
00133 }
00134
00135 class TGA_Exporter
00136 {
00137 public:
00138
00139 struct TGAHeader
00140 {
00141 unsigned char identsize;
00142 unsigned char colourmaptype;
00143 unsigned char imagetype;
00144
00145 unsigned char colormapspecs[5];
00146
00147 short xstart;
00148 short ystart;
00149 short width;
00150 short height;
00151 unsigned char bits;
00152 unsigned char descriptor;
00153 };
00154
00155 static void convert(const QString& outfile,const QImage& im)
00156 {
00157 TGAHeader tga;
00158 tga.identsize = 0;
00159 tga.colourmaptype = 0;
00160 tga.imagetype = 2;
00161
00162 memset(tga.colormapspecs,0,5);
00163 tga.xstart = (short) im.offset().x();
00164 tga.ystart = (short) im.offset().y();
00165 tga.height = (short) im.height();
00166 tga.width = (short) im.width();
00167
00168
00169
00170
00171 QFile file(qPrintable(outfile));
00172 file.setPermissions(QFile::WriteOther);
00173 file.open(QIODevice::WriteOnly);
00174 QString err = file.errorString();
00175
00176 unsigned char* tmpchan;
00177 int totbyte;
00178 if (im.hasAlphaChannel())
00179 {
00180
00181
00182
00183
00184
00185
00186
00187 tga.descriptor = (char) 40;
00188 tga.bits = (char) 32;
00189 }
00190 else
00191 {
00192
00193
00194
00195
00196
00197
00198
00199 tga.descriptor = (char) 32;
00200 tga.bits = (char) 24;
00201 }
00202
00203 totbyte = tga.height * tga.width * (tga.bits / 8);
00204
00205 if (im.hasAlphaChannel())
00206 tmpchan = const_cast<unsigned char*>(im.bits());
00207 else
00208 {
00209 tmpchan = new unsigned char[totbyte];
00210
00211 int ii = 0;
00212 while(ii < totbyte)
00213 {
00214 tmpchan[ii] = const_cast<unsigned char*>(im.bits())[ii + (ii/3)];
00215 ++ii;
00216 }
00217 }
00218
00219 file.write((char *) &tga,qint64(sizeof(tga)));
00220 file.write(reinterpret_cast<const char*>(tmpchan),qint64(totbyte));
00221 file.close();
00222 }
00223
00224 template<typename SaveMeshType>
00225 static void convertTexturesFiles(SaveMeshType& m,const QString& file_path,QStringList& conv_file)
00226 {
00227 for(unsigned int ii = 0; ii < m.textures.size(); ++ii)
00228 {
00229 QString qtmp(m.textures[ii].c_str());
00230 QString ext = QtUtilityFunctions::fileExtension(qtmp);
00231 QString filename = QtUtilityFunctions::fileNameFromPath(qtmp);
00232 if (ext.toLower() != "tga")
00233 {
00234 QImage img(qtmp);
00235 QString stmp;
00236 if ((file_path.at(file_path.length() - 1) != '/') || (file_path.at(file_path.length() - 1) != '\\'))
00237 stmp = file_path + QString("/");
00238 else
00239 stmp = file_path;
00240 filename = stmp + filename.remove(ext) + "tga";
00241 m.textures[ii] = filename.toStdString();
00242 TGA_Exporter::convert(filename,img);
00243 conv_file.push_back(filename);
00244 }
00245 }
00246 }
00247
00248 static void removeConvertedTexturesFiles(const QStringList& conv_file)
00249 {
00250 for(unsigned int ii = 0;ii < conv_file.size();++ii)
00251 {
00252 QDir dir(QtUtilityFunctions::pathWithoutFileName(conv_file[ii]));
00253 dir.remove(QtUtilityFunctions::fileNameFromPath(conv_file[ii]));
00254 }
00255 }
00256 };
00257
00258
00259
00260 template<typename SaveMeshType>
00261 class ExporterIDTF
00262 {
00263
00264 public:
00265 typedef typename SaveMeshType::VertexPointer VertexPointer;
00266 typedef typename SaveMeshType::ScalarType ScalarType;
00267 typedef typename SaveMeshType::VertexType VertexType;
00268 typedef typename SaveMeshType::FaceType FaceType;
00269 typedef typename SaveMeshType::ConstVertexIterator ConstVertexIterator;
00270 typedef typename SaveMeshType::VertexIterator VertexIterator;
00271 typedef typename SaveMeshType::FaceIterator FaceIterator;
00272 typedef typename SaveMeshType::ConstFaceIterator ConstFaceIterator;
00273 typedef typename SaveMeshType::CoordType CoordType;
00274
00275 enum IDTFError
00276 {
00277 E_NOERROR
00278 };
00279
00280 static const char *ErrorMsg(int error)
00281 {
00282 static const char * dae_error_msg[] =
00283 {
00284 "No errors"
00285 };
00286
00287 if(error>0 || error<0) return "Unknown error";
00288 else return dae_error_msg[error];
00289 };
00290
00291 static QStringList convertInTGATextures(SaveMeshType& m,const QString& path,QStringList& textures_to_be_restored)
00292 {
00293
00294
00295
00296 for(unsigned int ii = 0; ii < m.textures.size();++ii)
00297 textures_to_be_restored.push_back(m.textures[ii].c_str());
00298
00299
00300 QStringList convfile;
00301 vcg::tri::io::TGA_Exporter::convertTexturesFiles(m,path,convfile);
00302 return convfile;
00303 }
00304
00305 static void removeConvertedTGATextures(const QStringList& convfile)
00306 {
00307
00308 vcg::tri::io::TGA_Exporter::removeConvertedTexturesFiles(convfile);
00309 }
00310
00311 static void restoreConvertedTextures(SaveMeshType& mesh_with_textures_to_be_restored,const QStringList& textures_to_be_restored)
00312 {
00313 mesh_with_textures_to_be_restored.textures.clear();
00314 for(QStringList::ConstIterator it = textures_to_be_restored.begin();it != textures_to_be_restored.end();++it)
00315 mesh_with_textures_to_be_restored.textures.push_back(it->toStdString());
00316 }
00317
00318 static int Save(SaveMeshType& m,const char* file,const int mask)
00319 {
00320
00321 Output_File idtf(file);
00322
00323 idtf.write(0,"FILE_FORMAT \"IDTF\"");
00324 idtf.write(0,"FORMAT_VERSION 100\n");
00325
00326 idtf.write(0,"NODE \"MODEL\" {");
00327 idtf.write(1,"NODE_NAME \"VcgMesh01\"");
00328 idtf.write(1,"PARENT_LIST {");
00329 idtf.write(2,"PARENT_COUNT 1");
00330 idtf.write(2,"PARENT 0 {");
00331 idtf.write(3,"PARENT_NAME \"<NULL>\"");
00332 idtf.write(3,"PARENT_TM {");
00333 idtf.write(4,"1.000000 0.000000 0.000000 0.000000");
00334 idtf.write(4,"0.000000 1.000000 0.000000 0.000000");
00335 idtf.write(4,"0.000000 0.000000 1.000000 0.000000");
00336 idtf.write(4,"0.000000 0.000000 0.000000 1.000000");
00337 idtf.write(3,"}");
00338 idtf.write(2,"}");
00339 idtf.write(1,"}");
00340 idtf.write(1,"RESOURCE_NAME \"MyVcgMesh01\"");
00341 idtf.write(0,"}");
00342
00343
00344 if ((mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD) | (mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00345 {
00346 idtf.write(0,"");
00347 idtf.write(0,"RESOURCE_LIST \"SHADER\" {");
00348 idtf.write(1,"RESOURCE_COUNT " + TextUtility::nmbToStr(m.textures.size()));
00349 for(unsigned int ii = 0; ii < m.textures.size(); ++ii)
00350 {
00351 idtf.write(1,"RESOURCE " + TextUtility::nmbToStr(ii) + " {");
00352 idtf.write(2,"RESOURCE_NAME \"ModelShader" + TextUtility::nmbToStr(ii) +"\"");
00353 std::string vertcol;
00354 if (mask & vcg::tri::io::Mask::IOM_VERTCOLOR)
00355 vertcol = "TRUE";
00356 else
00357 vertcol = "FALSE";
00358
00359 idtf.write(2,"ATTRIBUTE_USE_VERTEX_COLOR \"" + vertcol + "\"");
00360 idtf.write(2,"SHADER_MATERIAL_NAME \"Mat01\"");
00361
00362
00363 int texcount = 0;
00364 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00365 texcount = m.textures.size();
00366
00367
00368 idtf.write(2,"SHADER_ACTIVE_TEXTURE_COUNT " + TextUtility::nmbToStr(texcount));
00369 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00370 {
00371 idtf.write(2,"SHADER_TEXTURE_LAYER_LIST {");
00372 idtf.write(3,"TEXTURE_LAYER 0 {");
00373 idtf.write(4,"TEXTURE_NAME \"Texture" + TextUtility::nmbToStr(ii) +"\"");
00374 idtf.write(3,"}");
00375 idtf.write(2,"}");
00376 }
00377
00378
00379 }
00380 idtf.write(1,"}");
00381 idtf.write(0,"}");
00382 idtf.write(0,"");
00383 }
00384
00385 if ((mask & Mask::IOM_WEDGTEXCOORD) | (mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00386 {
00387 idtf.write(0,"RESOURCE_LIST \"MATERIAL\" {");
00388 idtf.write(1,"RESOURCE_COUNT 1");
00389 idtf.write(1,"RESOURCE 0 {");
00390 idtf.write(2,"RESOURCE_NAME \"Mat01\"");
00391 idtf.write(2,"MATERIAL_AMBIENT 0.2 0.2 0.2");
00392 idtf.write(2,"MATERIAL_DIFFUSE 0.8 0.8 0.8");
00393 idtf.write(2,"MATERIAL_SPECULAR 0.0 0.0 0.0");
00394 idtf.write(2,"MATERIAL_EMISSIVE 0.0 0.0 0.0");
00395 idtf.write(2,"MATERIAL_REFLECTIVITY 0.000000");
00396 idtf.write(2,"MATERIAL_OPACITY 1.000000");
00397 idtf.write(1,"}");
00398 idtf.write(0,"}");
00399 idtf.write(0,"");
00400 if ((mask & Mask::IOM_WEDGTEXCOORD))
00401 {
00402 idtf.write(0,"RESOURCE_LIST \"TEXTURE\" {");
00403 idtf.write(1,"RESOURCE_COUNT " + TextUtility::nmbToStr(m.textures.size()));
00404 for(unsigned int ii = 0; ii < m.textures.size();++ii)
00405 {
00406 idtf.write(1,"RESOURCE " + TextUtility::nmbToStr(ii) + " {");
00407 idtf.write(2,"RESOURCE_NAME \"Texture" + TextUtility::nmbToStr(ii) + "\"");
00408 idtf.write(2,"TEXTURE_PATH \"" + m.textures[ii] + "\"");
00409 idtf.write(1,"}");
00410 }
00411 idtf.write(0,"}");
00412 }
00413
00414 }
00415 idtf.write(0,"");
00416 idtf.write(0,"RESOURCE_LIST \"MODEL\" {");
00417 idtf.write(1,"RESOURCE_COUNT 1");
00418 idtf.write(1,"RESOURCE 0 {");
00419 idtf.write(2,"RESOURCE_NAME \"MyVcgMesh01\"");
00420 idtf.write(2,"MODEL_TYPE \"MESH\"");
00421 idtf.write(2,"MESH {");
00422 idtf.write(3,"FACE_COUNT " + TextUtility::nmbToStr(m.face.size()));
00423 idtf.write(3,"MODEL_POSITION_COUNT " + TextUtility::nmbToStr(m.vert.size()));
00424 idtf.write(3,"MODEL_NORMAL_COUNT " + TextUtility::nmbToStr(m.face.size() * 3));
00425 if ((mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00426 idtf.write(3,"MODEL_DIFFUSE_COLOR_COUNT " + TextUtility::nmbToStr(m.face.size() * 3));
00427 else
00428 idtf.write(3,"MODEL_DIFFUSE_COLOR_COUNT 0");
00429 idtf.write(3,"MODEL_SPECULAR_COLOR_COUNT 0");
00430 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD) idtf.write(3,"MODEL_TEXTURE_COORD_COUNT " + TextUtility::nmbToStr(m.face.size() * 3));
00431 else idtf.write(3,"MODEL_TEXTURE_COORD_COUNT 0");
00432 idtf.write(3,"MODEL_BONE_COUNT 0");
00433 unsigned int mod_sha;
00434 if (m.textures.size() == 0)
00435 mod_sha = 1;
00436 else
00437 mod_sha = m.textures.size();
00438 idtf.write(3,"MODEL_SHADING_COUNT " + TextUtility::nmbToStr(mod_sha));
00439 idtf.write(3,"MODEL_SHADING_DESCRIPTION_LIST {");
00440 unsigned int hh = 0;
00441 do
00442 {
00443 idtf.write(4,"SHADING_DESCRIPTION " + TextUtility::nmbToStr(hh) + " {");
00444 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00445 {
00446 idtf.write(5,"TEXTURE_LAYER_COUNT 1");
00447 idtf.write(5,"TEXTURE_COORD_DIMENSION_LIST {");
00448 idtf.write(6,"TEXTURE_LAYER 0 DIMENSION: 2");
00449 idtf.write(5,"}");
00450 idtf.write(5,"SHADER_ID 0");
00451 }
00452 else
00453 {
00454 idtf.write(5,"TEXTURE_LAYER_COUNT 0");
00455 idtf.write(5,"SHADER_ID 0");
00456 }
00457 idtf.write(4,"}");
00458 ++hh;
00459 }
00460 while(hh < m.textures.size());
00461 idtf.write(3,"}");
00462 idtf.write(3,"MESH_FACE_POSITION_LIST {");
00463 for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
00464 {
00465 idtf.write(4,TextUtility::nmbToStr(fit->V(0) - &(*m.vert.begin())) + " " +
00466 TextUtility::nmbToStr(fit->V(1) - &(*m.vert.begin())) + " " +
00467 TextUtility::nmbToStr(fit->V(2) - &(*m.vert.begin())));
00468 }
00469 idtf.write(3,"}");
00470
00471 idtf.write(3,"MESH_FACE_NORMAL_LIST {");
00472 unsigned int nn = 0;
00473 for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
00474 {
00475 idtf.write(4,TextUtility::nmbToStr(nn) + " " +
00476 TextUtility::nmbToStr(nn + 1) + " " +
00477 TextUtility::nmbToStr(nn + 2));
00478 nn += 3;
00479 }
00480 idtf.write(3,"}");
00481
00482 idtf.write(3,"MESH_FACE_SHADING_LIST {");
00483 for(FaceIterator fit = m.face.begin();fit != m.face.end();++fit)
00484 {
00485 unsigned int texind = 0;
00486 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00487 texind = fit->WT(0).N();
00488 idtf.write(4,TextUtility::nmbToStr(texind));
00489 }
00490 idtf.write(3,"}");
00491
00492 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00493 {
00494 idtf.write(3,"MESH_FACE_TEXTURE_COORD_LIST {");
00495 for(unsigned int ii = 0; ii < m.face.size();++ii)
00496 {
00497 idtf.write(4,"FACE " + TextUtility::nmbToStr(ii) + " {");
00498 idtf.write(5,"TEXTURE_LAYER 0 TEX_COORD: " + TextUtility::nmbToStr(ii * 3) + " " + TextUtility::nmbToStr(ii * 3 + 1) + " " + TextUtility::nmbToStr(ii * 3 + 2));
00499 idtf.write(4,"}");
00500 }
00501 idtf.write(3,"}");
00502 }
00503
00504 if ((mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00505 {
00506 idtf.write(3,"MESH_FACE_DIFFUSE_COLOR_LIST {");
00507 nn = 0;
00508 for(FaceIterator fit = m.face.begin();fit != m.face.end();++fit)
00509 {
00510 idtf.write(4,TextUtility::nmbToStr(nn) + " " +
00511 TextUtility::nmbToStr(nn + 1) + " " +
00512 TextUtility::nmbToStr(nn + 2));
00513 nn += 3;
00514 }
00515 idtf.write(3,"}");
00516 }
00517
00518 idtf.write(3,"MODEL_POSITION_LIST {");
00519
00520
00521
00522 for(ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit)
00523 {
00524 CoordType tmp = vit->P();
00525 idtf.write(4,TextUtility::nmbToStr(-tmp.X()) + " " +
00526 TextUtility::nmbToStr(tmp.Z()) + " " +
00527 TextUtility::nmbToStr(tmp.Y()));
00528 }
00529 idtf.write(3,"}");
00530
00531 idtf.write(3,"MODEL_NORMAL_LIST {");
00532 for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
00533 {
00534 for(unsigned int ii = 0;ii < 3;++ii)
00535 {
00536 fitn->N().Normalize();
00537 idtf.write(4,TextUtility::nmbToStr(-fitn->N().X()) + " " +
00538 TextUtility::nmbToStr(fitn->N().Z()) + " " +
00539 TextUtility::nmbToStr(fitn->N().Y()));
00540 }
00541 }
00542 idtf.write(3,"}");
00543
00544 if ((mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00545 {
00546 idtf.write(3,"MODEL_DIFFUSE_COLOR_LIST {");
00547
00548
00549 for(FaceIterator vit = m.face.begin();vit != m.face.end();++vit)
00550 {
00551
00552 for (unsigned int ii =0; ii <3;++ii)
00553 {
00554 vcg::Color4b cc;
00555 if (mask & vcg::tri::io::Mask::IOM_VERTCOLOR)
00556 cc = vit->V(ii)->C();
00557 else
00558 cc = vit->C();
00559 idtf.write(4,TextUtility::nmbToStr(float(cc.X()) / 255.0f) + " " +
00560 TextUtility::nmbToStr(float(cc.Y()) / 255.0f) + " " +
00561 TextUtility::nmbToStr(float(cc.Z()) / 255.0f) + " " + TextUtility::nmbToStr(float(cc.W()) / 255.0f));
00562 }
00563 }
00564 idtf.write(3,"}");
00565 }
00566
00567 if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
00568 {
00569 idtf.write(3,"MODEL_TEXTURE_COORD_LIST {");
00570 for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
00571 {
00572 for(unsigned int ii = 0;ii < 3;++ii)
00573 {
00574 idtf.write(4,TextUtility::nmbToStr(fitn->WT(ii).U()) + " " +
00575 TextUtility::nmbToStr(-fitn->WT(ii).V()) + " " + TextUtility::nmbToStr(0.0f) + " " + TextUtility::nmbToStr(0.0f));
00576 }
00577 }
00578 idtf.write(3,"}");
00579 }
00580
00581 idtf.write(2,"}");
00582 idtf.write(1,"}");
00583 idtf.write(0,"}");
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608 if ((mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD) | (mask & vcg::tri::io::Mask::IOM_VERTCOLOR) | (mask & vcg::tri::io::Mask::IOM_FACECOLOR))
00609 {
00610 idtf.write(0,"");
00611 idtf.write(0,"MODIFIER \"SHADING\" {");
00612 idtf.write(1,"MODIFIER_NAME \"VcgMesh01\"");
00613 idtf.write(1,"PARAMETERS {");
00614
00615 idtf.write(2,"SHADER_LIST_COUNT " + TextUtility::nmbToStr(m.textures.size()));
00616 idtf.write(2,"SHADING_GROUP {");
00617 for(unsigned int ii = 0; ii < m.textures.size();++ii)
00618 {
00619 idtf.write(3,"SHADER_LIST " + TextUtility::nmbToStr(ii) + "{");
00620 idtf.write(4,"SHADER_COUNT 1");
00621 idtf.write(4,"SHADER_NAME_LIST {");
00622 idtf.write(5,"SHADER 0 NAME: \"ModelShader" + TextUtility::nmbToStr(ii) + "\"");
00623 idtf.write(4,"}");
00624 idtf.write(3,"}");
00625 }
00626 idtf.write(2,"}");
00627 idtf.write(1,"}");
00628 idtf.write(0,"}");
00629 }
00630
00631 return E_NOERROR;
00632 }
00633
00634 static int GetExportMaskCapability()
00635 {
00636 int capability = 0;
00637
00638
00639 capability |= vcg::tri::io::Mask::IOM_VERTNORMAL;
00640 capability |= vcg::tri::io::Mask::IOM_VERTCOLOR;
00641
00642
00643 capability |= vcg::tri::io::Mask::IOM_FACECOLOR;
00644
00646 capability |= vcg::tri::io::Mask::IOM_WEDGTEXCOORD;
00647 capability |= vcg::tri::io::Mask::IOM_WEDGNORMAL;
00648
00649 return capability;
00650 }
00651 };
00652 }
00653 }
00654 }
00655
00656 #endif