Unabbreviate "transform" to "transformationMatrix"

Tue, 15 Nov 2016 17:12:50 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 15 Nov 2016 17:12:50 +0200
changeset 1045
f726f8f49c7e
parent 1044
b5106ca8705e
child 1046
f4a7b56c7eb2

Unabbreviate "transform" to "transformationMatrix"

src/addObjectDialog.cpp file | annotate | diff | comparison | revisions
src/editmodes/circleMode.cpp file | annotate | diff | comparison | revisions
src/glRenderer.cpp file | annotate | diff | comparison | revisions
src/ldDocument.cpp file | annotate | diff | comparison | revisions
src/ldObject.cpp file | annotate | diff | comparison | revisions
src/ldObject.h file | annotate | diff | comparison | revisions
src/mainwindow.cpp file | annotate | diff | comparison | revisions
src/mathfunctions.cpp file | annotate | diff | comparison | revisions
src/toolsets/algorithmtoolset.cpp file | annotate | diff | comparison | revisions
--- a/src/addObjectDialog.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/addObjectDialog.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -202,7 +202,7 @@
 				dsb_coords[ax]->setValue (value);
 			});
 
-			defaultMatrix = mo->transform();
+			defaultMatrix = mo->transformationMatrix();
 		}
 
 		le_matrix->setText (defaultMatrix.toString());
@@ -382,7 +382,7 @@
 			for_axes (ax)
 				ref->setCoordinate (ax, dlg.dsb_coords[ax]->value());
 
-			ref->setTransform (transform);
+			ref->setTransformationMatrix (transform);
 			ref->setFileInfo (document);
 		} break;
 
--- a/src/editmodes/circleMode.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/editmodes/circleMode.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -127,7 +127,7 @@
 			refFile = primitives()->getPrimitive(spec);
 			LDSubfileReference* ref = LDSpawn<LDSubfileReference>();
 			ref->setFileInfo (refFile);
-			ref->setTransform (getCircleDrawMatrix (cmp.scale));
+			ref->setTransformationMatrix (getCircleDrawMatrix (cmp.scale));
 			ref->setPosition (m_drawedVerts[0]);
 			ref->setColor (MainColor);
 			objs << ref;
@@ -180,7 +180,7 @@
 	{
 		LDSubfileReference* ref = LDSpawn<LDSubfileReference>();
 		ref->setFileInfo (refFile);
-		ref->setTransform (transform);
+		ref->setTransformationMatrix (transform);
 		ref->setPosition (m_drawedVerts[0]);
 		ref->setColor (MainColor);
 		objs << ref;
@@ -326,4 +326,4 @@
 int CircleMode::maxVertices() const
 {
 	return 3;
-}
\ No newline at end of file
+}
--- a/src/glRenderer.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/glRenderer.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -1591,7 +1591,7 @@
 		ref->setColor (MainColor);
 		ref->setFileInfo (m_documents->getDocumentByName (primitiveName));
 		ref->setPosition (Origin);
-		ref->setTransform (IdentityMatrix);
+		ref->setTransformationMatrix (IdentityMatrix);
 		currentDocument()->insertObject (m_window->suggestInsertPoint(), ref);
 		ref->select();
 		m_window->buildObjectList();
--- a/src/ldDocument.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/ldDocument.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -496,7 +496,7 @@
 				for (int i = 0; i < 9; ++i)
 					transform[i] = tokens[i + 5].toDouble(); // 5 - 13
 
-				obj->setTransform (transform);
+				obj->setTransformationMatrix (transform);
 				obj->setFileInfo (document);
 				return obj;
 			}
--- a/src/ldObject.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/ldObject.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -99,7 +99,7 @@
 QString LDSubfileReference::asText() const
 {
 	QString val = format ("1 %1 %2 ", color(), position());
-	val += transform().toString();
+	val += transformationMatrix().toString();
 	val += ' ';
 	val += fileInfo()->name();
 	return val;
@@ -374,11 +374,11 @@
 	case OBJ_SubfileReference:
 		{
 			LDSubfileReference* ref = static_cast<LDSubfileReference*> (obj);
-			Matrix newMatrix = transform * ref->transform();
+			Matrix newMatrix = transform * ref->transformationMatrix();
 			Vertex newpos = ref->position();
 			newpos.transform (transform, pos);
 			ref->setPosition (newpos);
-			ref->setTransform (newMatrix);
+			ref->setTransformationMatrix (newMatrix);
 		}
 		break;
 
@@ -398,7 +398,7 @@
 
 	// Transform the objects
 	for (LDObject* obj : objs)
-		TransformObject (obj, transform(), position(), color());
+		TransformObject (obj, transformationMatrix(), position(), color());
 
 	return objs;
 }
@@ -437,7 +437,7 @@
 	for (LDPolygon& entry : data)
 	{
 		for (int i = 0; i < entry.numVertices(); ++i)
-			entry.vertices[i].transform (transform(), position());
+			entry.vertices[i].transform (transformationMatrix(), position());
 	}
 
 	return data;
@@ -710,7 +710,7 @@
 		if (axisSet & (1 << Z))
 			matrixModifier[8] = -1;
 
-		setTransform (transform() * matrixModifier);
+		setTransformationMatrix (transformationMatrix() * matrixModifier);
 		return;
 	}
 
@@ -867,7 +867,7 @@
 LDMatrixObject::LDMatrixObject (const Matrix& transform, const Vertex& pos, LDDocument* document) :
 	LDObject (document),
 	m_position (pos),
-	m_transform (transform) {}
+	m_transformationMatrix (transform) {}
 
 void LDMatrixObject::setCoordinate (const Axis ax, double value)
 {
@@ -897,14 +897,14 @@
 
 // =============================================================================
 //
-const Matrix& LDMatrixObject::transform() const
+const Matrix& LDMatrixObject::transformationMatrix() const
 {
-	return m_transform;
+	return m_transformationMatrix;
 }
 
-void LDMatrixObject::setTransform (const Matrix& val)
+void LDMatrixObject::setTransformationMatrix (const Matrix& val)
 {
-	changeProperty (this, &m_transform, val);
+	changeProperty (this, &m_transformationMatrix, val);
 }
 
 LDError::LDError (QString contents, QString reason, LDDocument* document) :
@@ -1175,4 +1175,4 @@
 void LDSubfileReference::getVertices (QSet<Vertex>& verts) const
 {
 	verts.unite(fileInfo()->inlineVertices());
-}
\ No newline at end of file
+}
--- a/src/ldObject.h	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/ldObject.h	Tue Nov 15 17:12:50 2016 +0200
@@ -180,16 +180,16 @@
 
 public:
 	LDMatrixObject (LDDocument* document = nullptr);
-	LDMatrixObject (const Matrix& transform, const Vertex& pos, LDDocument* document = nullptr);
+	LDMatrixObject (const Matrix& transformationMatrix, const Vertex& pos, LDDocument* document = nullptr);
 
 	const Vertex& position() const;
 	void setCoordinate (const Axis ax, double value);
 	void setPosition (const Vertex& a);
-	const Matrix& transform() const;
-	void setTransform (const Matrix& value);
+	void setTransformationMatrix (const Matrix& value);
+	const Matrix& transformationMatrix() const;
 
 private:
-	Matrix m_transform;
+	Matrix m_transformationMatrix;
 };
 
 //
--- a/src/mainwindow.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/mainwindow.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -435,7 +435,7 @@
 				descr = format ("%1 %2, (", ref->fileInfo()->getDisplayName(), ref->position().toString (true));
 
 				for (int i = 0; i < 9; ++i)
-					descr += format ("%1%2", ref->transform()[i], (i != 8) ? " " : "");
+					descr += format ("%1%2", ref->transformationMatrix()[i], (i != 8) ? " " : "");
 
 				descr += ')';
 				break;
--- a/src/mathfunctions.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/mathfunctions.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -77,7 +77,7 @@
 			mo->setPosition (v);
 
 			// Transform the matrix
-			mo->setTransform(transformationMatrix * mo->transform());
+			mo->setTransformationMatrix(transformationMatrix * mo->transformationMatrix());
 		}
 	}
 }
@@ -111,4 +111,4 @@
 	}
 
 	return Vertex();
-}
\ No newline at end of file
+}
--- a/src/toolsets/algorithmtoolset.cpp	Tue Nov 15 13:52:44 2016 +0200
+++ b/src/toolsets/algorithmtoolset.cpp	Tue Nov 15 17:12:50 2016 +0200
@@ -157,7 +157,7 @@
 		if (mo)
 		{
 			Vertex v = mo->position();
-			Matrix t = mo->transform();
+			Matrix t = mo->transformationMatrix();
 
 			v.apply ([&](Axis, double& a)
 			{
@@ -170,7 +170,7 @@
 			});
 
 			mo->setPosition (v);
-			mo->setTransform (t);
+			mo->setTransformationMatrix (t);
 			num += 12;
 		}
 		else
@@ -576,7 +576,7 @@
 		ref->setColor (MainColor);
 		ref->setFileInfo (doc);
 		ref->setPosition (Origin);
-		ref->setTransform (IdentityMatrix);
+		ref->setTransformationMatrix (IdentityMatrix);
 		currentDocument()->insertObject (refidx, ref);
 
 		// Refresh stuff

mercurial