summaryrefslogtreecommitdiffstats
path: root/src/Data
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-04-11 10:43:05 +0200
committerneoraider <devnull@localhost>2008-04-11 10:43:05 +0200
commit3e81e7e05f888eadd81385768baa3ff0c1821452 (patch)
treea065e2b3438c27f0d67b2155baee8b193144df2d /src/Data
parent7db6adf7e9e178c83f0278124a3d6c786134b014 (diff)
downloadzoomedit-3e81e7e05f888eadd81385768baa3ff0c1821452.tar
zoomedit-3e81e7e05f888eadd81385768baa3ff0c1821452.zip
zoomedit:
* Added Xml util class to remove dependency on SVN libxml++.
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Triangle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Data/Triangle.cpp b/src/Data/Triangle.cpp
index d334c12..a85d8ad 100644
--- a/src/Data/Triangle.cpp
+++ b/src/Data/Triangle.cpp
@@ -18,6 +18,7 @@
*/
#include "Triangle.h"
+#include "../Util/Xml.h"
#include <cstdlib>
namespace ZoomEdit {
@@ -121,7 +122,7 @@ void Triangle::setNormal(unsigned int i, const Vector &n) {
normals[i] = n;
if(!normalNodes[i])
- normalNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(vertexNodes[i]), "normal");
+ normalNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(vertexNodes[i]), "normal");
normalNodes[i]->set_attribute("x", Glib::ustring::format(n.getX()));
normalNodes[i]->set_attribute("y", Glib::ustring::format(n.getY()));
@@ -133,9 +134,9 @@ void Triangle::setTexCoords(unsigned int i, const TexCoords &t) {
if(!texCoordsNodes[i]) {
if(normalNodes[i])
- texCoordsNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(normalNodes[i]), "texcoords");
+ texCoordsNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(normalNodes[i]), "texcoords");
else
- texCoordsNodes[i] = triangleNode->add_child(static_cast<xmlpp::Node*>(vertexNodes[i]), "texcoords");
+ texCoordsNodes[i] = Util::Xml::addSibling(static_cast<xmlpp::Node*>(vertexNodes[i]), "texcoords");
}
texCoordsNodes[i]->set_attribute("s", Glib::ustring::format(t.getS()));