src/linetypes/edge.cpp

changeset 81
62373840e33a
parent 77
028798a72591
child 86
4bec0525ef1b
--- a/src/linetypes/edge.cpp	Wed Mar 11 19:05:34 2020 +0200
+++ b/src/linetypes/edge.cpp	Tue Mar 17 23:13:29 2020 +0200
@@ -56,3 +56,21 @@
 	Q_UNUSED(context)
 	polygons.push_back(gl::edgeLine(this->point_1, this->point_2, this->colorIndex, this->id));
 }
+
+int ldraw::Edge::numPoints() const
+{
+	return 2;
+}
+
+const glm::vec3& ldraw::Edge::getPoint(int index) const
+{
+	switch (index)
+	{
+	case 0:
+		return this->point_1;
+	case 1:
+		return this->point_2;
+	default:
+		return ldraw::ColoredObject::getPoint(index);
+	}
+}

mercurial