Thu, 23 Feb 2017 20:25:47 +0200
Removed the Origin and axes global constants.
--- a/src/basics.h Thu Feb 23 20:21:40 2017 +0200 +++ b/src/basics.h Thu Feb 23 20:25:47 2017 +0200 @@ -44,8 +44,6 @@ Z }; -static const Axis axes[] = {X, Y, Z}; - // // Derivative of QVector3D: this class is used for the vertices. // @@ -111,8 +109,6 @@ Vertex m_vertex1; }; -extern const Vertex Origin; - static const double pi = 3.14159265358979323846;
--- a/src/glrenderer.cpp Thu Feb 23 20:21:40 2017 +0200 +++ b/src/glrenderer.cpp Thu Feb 23 20:25:47 2017 +0200 @@ -286,7 +286,7 @@ { const auto& data = axisInfo[i]; - for (Axis axis : axes) + for (Axis axis : {X, Y, Z}) { axisdata[(i * 6) + axis] = data.extrema[axis]; axisdata[(i * 6) + 3 + axis] = -data.extrema[axis];
--- a/src/linetypes/modelobject.cpp Thu Feb 23 20:21:40 2017 +0200 +++ b/src/linetypes/modelobject.cpp Thu Feb 23 20:25:47 2017 +0200 @@ -44,7 +44,7 @@ m_isHidden {false}, m_isSelected {false}, _model {model}, - m_coords {Origin} + m_coords {{0, 0, 0}} { assert(_model != nullptr); @@ -493,7 +493,7 @@ LDMatrixObject::LDMatrixObject (Model* model) : LDObject (model), - m_position (Origin) {} + m_position {0, 0, 0} {} LDMatrixObject::LDMatrixObject (const Matrix& transform, const Vertex& pos, Model* model) : LDObject (model),
--- a/src/main.cpp Thu Feb 23 20:21:40 2017 +0200 +++ b/src/main.cpp Thu Feb 23 20:25:47 2017 +0200 @@ -22,10 +22,6 @@ #include "documentmanager.h" #include "mainwindow.h" -const Vertex Origin (0.0f, 0.0f, 0.0f); - -// ============================================================================= -// int main (int argc, char* argv[]) { QApplication app (argc, argv);
--- a/src/mathfunctions.cpp Thu Feb 23 20:21:40 2017 +0200 +++ b/src/mathfunctions.cpp Thu Feb 23 20:25:47 2017 +0200 @@ -28,7 +28,7 @@ void MathFunctions::rotateVertex(Vertex& vertex, const Vertex& rotationPoint, const Matrix& transformationMatrix) const { vertex -= rotationPoint; - vertex.transform (transformationMatrix, Origin); + vertex.transform (transformationMatrix, {0, 0, 0}); vertex += rotationPoint; }
--- a/src/toolsets/algorithmtoolset.cpp Thu Feb 23 20:21:40 2017 +0200 +++ b/src/toolsets/algorithmtoolset.cpp Thu Feb 23 20:25:47 2017 +0200 @@ -560,7 +560,7 @@ currentDocument()->remove(object); // Add a reference to the new subfile to where the selection was - currentDocument()->emplaceAt<LDSubfileReference>(referencePosition, subfile, Matrix::identity, Origin); + currentDocument()->emplaceAt<LDSubfileReference>(referencePosition, subfile, Matrix::identity, Vertex {0, 0, 0}); // Refresh stuff m_window->updateDocumentList();