summaryrefslogtreecommitdiffstats
path: root/src/Data/Triangle.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-01-07 07:03:58 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-01-07 07:03:58 +0100
commite0cb6bd23b21f126bde42f74f4b1a798c3e15b0f (patch)
treebc9aba37b5b4c6edeb8725720c2ebfe5e80643ab /src/Data/Triangle.h
parentd71148392055eec06460fa24e3747d2c55d96b38 (diff)
downloadzoomedit-e0cb6bd23b21f126bde42f74f4b1a798c3e15b0f.tar
zoomedit-e0cb6bd23b21f126bde42f74f4b1a798c3e15b0f.zip
Major cleanup
Much better now!
Diffstat (limited to 'src/Data/Triangle.h')
-rw-r--r--src/Data/Triangle.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/Data/Triangle.h b/src/Data/Triangle.h
index 979fbfa..1bbb164 100644
--- a/src/Data/Triangle.h
+++ b/src/Data/Triangle.h
@@ -20,10 +20,10 @@
#ifndef ZOOMEDIT_DATA_TRIANGLE_H_
#define ZOOMEDIT_DATA_TRIANGLE_H_
-#include "Vertex.h"
-#include "Vector.h"
#include "TexCoords.h"
+
#include <libxml++/nodes/element.h>
+#include <vmmlib/vector.hpp>
namespace ZoomEdit {
namespace Data {
@@ -35,33 +35,32 @@ class Triangle {
xmlpp::Element *normalNodes[3];
xmlpp::Element *texCoordsNodes[3];
- Vertex vertices[3];
- Vector normals[3];
+ vmml::vec3f vertices[3];
+ vmml::vec3f normals[3];
TexCoords texCoords[3];
bool visible;
Glib::ustring texture;
- Vertex loadVertex(xmlpp::Element *node) const;
- Vector loadVector(xmlpp::Element *node) const;
+ vmml::vec3f loadVector(xmlpp::Element *node) const;
TexCoords loadTexCoords(xmlpp::Element *node) const;
public:
Triangle(xmlpp::Element *node);
- const Vertex& getVertex(unsigned int i) const {return vertices[i%3];}
- void setVertex(unsigned int i, const Vertex &v);
+ const vmml::vec3f& getVertex(unsigned int i) const {return vertices[i%3];}
+ void setVertex(unsigned int i, const vmml::vec3f &v);
- void setVertices(const Vertex *v) {
+ void setVertices(const vmml::vec3f *v) {
for(int i = 0; i < 3; ++i)
setVertex(i, v[i]);
}
- const Vector& getNormal(unsigned int i) const {return normals[i%3];}
- void setNormal(unsigned int i, const Vector &n);
+ const vmml::vec3f& getNormal(unsigned int i) const {return normals[i%3];}
+ void setNormal(unsigned int i, const vmml::vec3f &n);
- void setNormals(const Vector *n) {
+ void setNormals(const vmml::vec3f *n) {
for(int i = 0; i < 3; ++i)
setNormal(i, n[i]);
}