src/linetypes/quadrilateral.cpp

changeset 141
185eb297dc1e
parent 132
488d0ba6070b
child 158
5bd755eaa5a8
--- a/src/linetypes/quadrilateral.cpp	Mon Sep 27 21:04:45 2021 +0300
+++ b/src/linetypes/quadrilateral.cpp	Tue Sep 28 00:10:29 2021 +0300
@@ -34,3 +34,14 @@
 {
 	return Type::Quadrilateral;
 }
+
+QString ldraw::Quadrilateral::toLDrawCode() const
+{
+	return utility::format(
+		"4 %1 %2 %3 %4 %5",
+		this->colorIndex.index,
+		utility::vertexToString(this->points[0]),
+		utility::vertexToString(this->points[1]),
+		utility::vertexToString(this->points[2]),
+		utility::vertexToString(this->points[3]));
+}

mercurial