From 3e81e7e05f888eadd81385768baa3ff0c1821452 Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 11 Apr 2008 08:43:05 +0000 Subject: zoomedit: * Added Xml util class to remove dependency on SVN libxml++. --- src/Data/Triangle.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Data') 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 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(vertexNodes[i]), "normal"); + normalNodes[i] = Util::Xml::addSibling(static_cast(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(normalNodes[i]), "texcoords"); + texCoordsNodes[i] = Util::Xml::addSibling(static_cast(normalNodes[i]), "texcoords"); else - texCoordsNodes[i] = triangleNode->add_child(static_cast(vertexNodes[i]), "texcoords"); + texCoordsNodes[i] = Util::Xml::addSibling(static_cast(vertexNodes[i]), "texcoords"); } texCoordsNodes[i]->set_attribute("s", Glib::ustring::format(t.getS())); -- cgit v1.2.3