Quellcode durchsuchen

Merge pull request #1622 from assimp/fix_model_xml_3mf

fix the model xml
Kim Kulling vor 7 Jahren
Ursprung
Commit
bd8d3025bd
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  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 ] );
         writeVertex( mesh->mVertices[ i ] );
     }
     }
     mModelOutput << "</" << XmlTag::vertices << ">" << std::endl;
     mModelOutput << "</" << XmlTag::vertices << ">" << std::endl;
-    mModelOutput << "</" << XmlTag::mesh << ">" << std::endl;
 
 
     writeFaces( mesh );
     writeFaces( mesh );
+
+    mModelOutput << "</" << XmlTag::mesh << ">" << std::endl;
 }
 }
 
 
 void D3MFExporter::writeVertex( const aiVector3D &pos ) {
 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;
     mModelOutput << std::endl;
 }
 }
 
 

+ 1 - 1
code/D3MFImporter.cpp

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