src/types/vertex.cpp

changeset 1390
3eace926af7f
parent 1371
b8df4748d04e
child 1403
7a2d84112983
--- a/src/types/vertex.cpp	Sat May 26 17:28:15 2018 +0300
+++ b/src/types/vertex.cpp	Wed May 30 22:31:06 2018 +0300
@@ -92,6 +92,11 @@
 		return ::format("%1 %2 %3", this->x, this->y, this->z);
 }
 
+Vertex Vertex::fromVector(const QVector3D& vector)
+{
+	return {vector.x(), vector.y(), vector.z()};
+}
+
 Vertex Vertex::operator*(qreal scalar) const
 {
 	return {this->x * scalar, this->y * scalar, this->z * scalar};

mercurial