src/linetypes/triangle.cpp

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

mercurial