Skip to content
Snippets Groups Projects
Commit b8f8e5a2 authored by Brandon Lai-Cheong's avatar Brandon Lai-Cheong
Browse files

changed triangle representation

parent acd8ee91
No related branches found
No related tags found
No related merge requests found
...@@ -4,4 +4,4 @@ bool Triangle::neighbours(Triangle &other) { ...@@ -4,4 +4,4 @@ bool Triangle::neighbours(Triangle &other) {
return false; return false;
} }
Triangle::Triangle(Point p1, Point p2, Point p3, int depth) : p1{p1}, p2{p2}, p3{p3}, depth{depth} {} Triangle::Triangle(Point p1, Point p2, Point p3, int depth) : points{p1,p2,p3}, depth{depth} {}
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// points specified clockwise // points specified clockwise
struct Triangle { struct Triangle {
Point p1, p2, p3; Point points[3];
int depth; int depth;
bool neighbours(Triangle &other); bool neighbours(Triangle &other);
Triangle(Point p1, Point p2, Point p3, int depth); Triangle(Point p1, Point p2, Point p3, int depth);
......
#include "triangle_edges.h" #include "triangle_edges.h"
#include "triangle.h" #include "triangle.h"
TriangleEdges::TriangleEdges(const Triangle &t) : e1{Edge{t.p1, t.p2}}, e2{Edge{t.p2, t.p3}}, e3{Edge{t.p3, t.p1}}{ TriangleEdges::TriangleEdges(const Triangle &t) : e1{Edge{t.points[0], t.points[1]}}, e2{Edge{t.points[1], t.points[2]}}, e3{Edge{t.points[2], t.points[0]}}{
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment