瀏覽代碼

Merge pull request #1622 from assimp/fix_model_xml_3mf

fix the model xml
Kim Kulling 7 年之前
父節點
當前提交
bd8d3025bd
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 3 2
      code/D3MFExporter.cpp
  2. 1 1
      code/D3MFImporter.cpp

+ 3 - 2
code/D3MFExporter.cpp

@@ -240,13 +240,14 @@ void D3MFExporter::writeMesh( aiMesh *mesh ) {
         writeVertex( mesh->mVertices[ i ] );
     }
     mModelOutput << "</" << XmlTag::vertices << ">" << std::endl;
-    mModelOutput << "</" << XmlTag::mesh << ">" << std::endl;
 
     writeFaces( mesh );
+
+    mModelOutput << "</" << XmlTag::mesh << ">" << std::endl;
 }
 
 void D3MFExporter::writeVertex( const aiVector3D &pos ) {
-    mModelOutput << "<" << XmlTag::vertex << " x=\"" << pos.x << "\" y=\"" << pos.y << "\" z=\"" << pos.z << "\">";
+    mModelOutput << "<" << XmlTag::vertex << " x=\"" << pos.x << "\" y=\"" << pos.y << "\" z=\"" << pos.z << "\" />";
     mModelOutput << std::endl;
 }
 

+ 1 - 1
code/D3MFImporter.cpp

@@ -72,7 +72,7 @@ public:
     }
 
     ~XmlSerializer() {
-
+        // empty
     }
 
     void ImportXml(aiScene* scene) {