Sat, 24 Mar 2018 12:58:01 +0200
added comment
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | /* |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | * LDForge: LDraw parts authoring CAD |
1326 | 3 | * Copyright (C) 2013 - 2018 Teemu Piippo |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | * |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | * |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | * |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | */ |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
1025
4949da3fb4b3
Renamed ldObjectMath.cpp/.h to mathfunctions.cpp/.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1024
diff
changeset
|
19 | #include "mathfunctions.h" |
1147
a26568aa3cce
Renamed ldObject.cpp → linetypes/modelobject.cpp
Teemu Piippo <teemu@hecknology.net>
parents:
1079
diff
changeset
|
20 | #include "linetypes/modelobject.h" |
1315
23d48a709ffc
moved Vertex and BoundingBox into new code units
Teemu Piippo <teemu@hecknology.net>
parents:
1313
diff
changeset
|
21 | #include "types/boundingbox.h" |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
22 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
23 | MathFunctions::MathFunctions(QObject* parent) : |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
24 | HierarchyElement(parent) {} |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
25 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
26 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
27 | void MathFunctions::rotateVertex(Vertex& vertex, const Vertex& rotationPoint, const Matrix& transformationMatrix) const |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | { |
1313
4baed9f54de3
reworked Vertex, no longer a QVector3D subclass
Teemu Piippo <teemu@hecknology.net>
parents:
1161
diff
changeset
|
29 | vertex -= rotationPoint.toVector(); |
1161
e6a5ff67c057
Removed the Origin and axes global constants.
Teemu Piippo <teemu@hecknology.net>
parents:
1147
diff
changeset
|
30 | vertex.transform (transformationMatrix, {0, 0, 0}); |
1313
4baed9f54de3
reworked Vertex, no longer a QVector3D subclass
Teemu Piippo <teemu@hecknology.net>
parents:
1161
diff
changeset
|
31 | vertex += rotationPoint.toVector(); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | } |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
34 | |
1073
a0a0d581309b
Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents:
1072
diff
changeset
|
35 | void MathFunctions::rotateObjects(int l, int m, int n, double angle, const QVector<LDObject*>& objects) const |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
36 | { |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
37 | Vertex rotationPoint = getRotationPoint (objects); |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
38 | double cosAngle = cos(angle); |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
39 | double sinAngle = sin(angle); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | // ref: http://en.wikipedia.org/wiki/Transformation_matrix#Rotation_2 |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
42 | Matrix transformationMatrix ( |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
43 | { |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
44 | (l * l * (1 - cosAngle)) + cosAngle, |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
45 | (m * l * (1 - cosAngle)) - (n * sinAngle), |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
46 | (n * l * (1 - cosAngle)) + (m * sinAngle), |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
47 | |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
48 | (l * m * (1 - cosAngle)) + (n * sinAngle), |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
49 | (m * m * (1 - cosAngle)) + cosAngle, |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
50 | (n * m * (1 - cosAngle)) - (l * sinAngle), |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
51 | |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
52 | (l * n * (1 - cosAngle)) - (m * sinAngle), |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
53 | (m * n * (1 - cosAngle)) + (l * sinAngle), |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
54 | (n * n * (1 - cosAngle)) + cosAngle |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
55 | }); |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
56 | |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
57 | // Apply the above matrix to everything |
944 | 58 | for (LDObject* obj : objects) |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
59 | { |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
60 | if (obj->numVertices()) |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
61 | { |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
62 | for (int i = 0; i < obj->numVertices(); ++i) |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
63 | { |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
64 | Vertex v = obj->vertex (i); |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
65 | rotateVertex(v, rotationPoint, transformationMatrix); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
66 | obj->setVertex (i, v); |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
67 | } |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
68 | } |
967 | 69 | else if (obj->hasMatrix()) |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
70 | { |
945
c310073e4f22
More sharedpointer removal
Teemu Piippo <crimsondusk64@gmail.com>
parents:
944
diff
changeset
|
71 | LDMatrixObject* mo = dynamic_cast<LDMatrixObject*> (obj); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
72 | |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
73 | // Transform the position |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
74 | Vertex v = mo->position(); |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
75 | rotateVertex(v, rotationPoint, transformationMatrix); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
76 | mo->setPosition (v); |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
77 | |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
78 | // Transform the matrix |
1045
f726f8f49c7e
Unabbreviate "transform" to "transformationMatrix"
Teemu Piippo <teemu@hecknology.net>
parents:
1035
diff
changeset
|
79 | mo->setTransformationMatrix(transformationMatrix * mo->transformationMatrix()); |
869
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
80 | } |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
81 | } |
7184f3bae695
- circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
82 | } |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
83 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
84 | |
1073
a0a0d581309b
Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents:
1072
diff
changeset
|
85 | Vertex MathFunctions::getRotationPoint(const QVector<LDObject*>& objs) const |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
86 | { |
1323
05b3e173c900
Config is now a namespace
Teemu Piippo <teemu@hecknology.net>
parents:
1319
diff
changeset
|
87 | switch (RotationPoint (config::rotationPointType())) |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
88 | { |
1035
8a60250175ba
Further improved enum handling
Teemu Piippo <teemu@compsta2.com>
parents:
1025
diff
changeset
|
89 | case ObjectOrigin: |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
90 | { |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
91 | BoundingBox box; |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
92 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
93 | // Calculate center vertex |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
94 | for (LDObject* obj : objs) |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
95 | { |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
96 | if (obj->hasMatrix()) |
1079
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
97 | { |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
98 | box << static_cast<LDMatrixObject*> (obj)->position(); |
1079
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
99 | } |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
100 | else |
1079
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
101 | { |
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
102 | for (int i = 0; i < obj->numVertices(); ++i) |
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
103 | box << obj->vertex(i); |
67c6e5d32e68
More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.
Teemu Piippo <teemu@hecknology.net>
parents:
1073
diff
changeset
|
104 | } |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
105 | } |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
106 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
107 | return box.center(); |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
108 | } |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
109 | |
1035
8a60250175ba
Further improved enum handling
Teemu Piippo <teemu@compsta2.com>
parents:
1025
diff
changeset
|
110 | case WorldOrigin: |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
111 | return Vertex(); |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
112 | |
1035
8a60250175ba
Further improved enum handling
Teemu Piippo <teemu@compsta2.com>
parents:
1025
diff
changeset
|
113 | case CustomPoint: |
1323
05b3e173c900
Config is now a namespace
Teemu Piippo <teemu@hecknology.net>
parents:
1319
diff
changeset
|
114 | return config::customRotationPoint(); |
1024
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
115 | } |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
116 | |
67ba0ee049eb
Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
117 | return Vertex(); |
1045
f726f8f49c7e
Unabbreviate "transform" to "transformationMatrix"
Teemu Piippo <teemu@hecknology.net>
parents:
1035
diff
changeset
|
118 | } |