summaryrefslogtreecommitdiffstats
path: root/src/Math/Triangle2D.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Math/Triangle2D.h')
-rw-r--r--src/Math/Triangle2D.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Math/Triangle2D.h b/src/Math/Triangle2D.h
index f8f02dd..f6bb6e2 100644
--- a/src/Math/Triangle2D.h
+++ b/src/Math/Triangle2D.h
@@ -20,39 +20,39 @@
#ifndef ZOOMEDIT_MATH_TRIANGLE2D_H_
#define ZOOMEDIT_MATH_TRIANGLE2D_H_
-#include "Vertex2D.h"
+#include <vmmlib/vector.hpp>
namespace ZoomEdit {
namespace Math {
class Triangle2D {
private:
- Vertex2D vertices[3];
+ vmml::vec2f vertices[3];
public:
Triangle2D() {}
- Triangle2D(const Vertex2D &v1, const Vertex2D &v2, const Vertex2D &v3) {
+ Triangle2D(const vmml::vec2f &v1, const vmml::vec2f &v2, const vmml::vec2f &v3) {
vertices[0] = v1;
vertices[1] = v2;
vertices[2] = v3;
}
- Triangle2D(const Vertex2D *v) {
+ Triangle2D(const vmml::vec2f *v) {
setVertices(v);
}
- const Vertex2D& getVertex(unsigned int i) const {return vertices[i];}
- void setVertex(unsigned int i, const Vertex2D &v) {vertices[i] = v;}
+ const vmml::vec2f& getVertex(unsigned int i) const {return vertices[i];}
+ void setVertex(unsigned int i, const vmml::vec2f &v) {vertices[i] = v;}
- void setVertices(const Vertex2D *v) {
+ void setVertices(const vmml::vec2f *v) {
for(int i = 0; i < 3; ++i)
setVertex(i, v[i]);
}
float area() const;
- bool contains(const Vertex2D &v) const;
+ bool contains(const vmml::vec2f &v) const;
};
}