summaryrefslogtreecommitdiffstats
path: root/Edge.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-02-15 12:01:04 +0100
committerneoraider <devnull@localhost>2008-02-15 12:01:04 +0100
commit80b4f14530426d21c7ea26b7976a728f5b36c294 (patch)
treea3d54b26f072f1204c7a1146bd1dc96a8a3850d3 /Edge.h
parentc4aadd98230f3b9ab50398b715164ff874ea8a61 (diff)
downloadzoomedit-80b4f14530426d21c7ea26b7976a728f5b36c294.tar
zoomedit-80b4f14530426d21c7ea26b7976a728f5b36c294.zip
Added edges to rooms.
Diffstat (limited to 'Edge.h')
-rw-r--r--Edge.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Edge.h b/Edge.h
new file mode 100644
index 0000000..6ad9417
--- /dev/null
+++ b/Edge.h
@@ -0,0 +1,24 @@
+#ifndef EDGE_H_
+#define EDGE_H_
+
+#include "LevelVertex.h"
+#include "Line.h"
+
+
+class Edge {
+ private:
+ LevelVertex vertex1, vertex2;
+
+ public:
+ Edge(const LevelVertex &v1, const LevelVertex &v2)
+ : vertex1(v1), vertex2(v2) {}
+
+ const LevelVertex& getVertex1() const {return vertex1;}
+ const LevelVertex& getVertex2() const {return vertex2;}
+
+ Line toLine() const {
+ return Line(*vertex1, *vertex2);
+ }
+};
+
+#endif /*EDGE_H_*/