Skip to content

Commit 38baa91

Browse files
committed
remove camera copies
1 parent e75af15 commit 38baa91

33 files changed

+59
-2601
lines changed

1.9.camera/camera.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
#include <cmath>
1010

11-
constexpr float radians(float angle)
12-
{
13-
return angle * float(M_PI) / 180.0;
14-
}
15-
1611
Camera::Camera(QObjectPointer parent)
1712
: QObject(parent)
1813
{

1.9.camera/camera.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,9 @@ class Camera : public QObject
9393
bool m_blockMove {false};
9494
};
9595

96+
constexpr inline float radians(float angle)
97+
{
98+
return angle * float(M_PI) / 180.0;
99+
}
100+
96101
#endif // CAMERA_H

1.9.camera/camera.qbs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import qbs
22

3-
OpenGLApplication {
4-
files: [
5-
"*.cpp",
6-
"*.h",
7-
"*.qrc",
8-
]
3+
Project {
4+
OpenGLApplication {
5+
Depends { name: "cameralib" }
6+
files: [
7+
"main.cpp",
8+
"window.cpp",
9+
"window.h",
10+
"resources.qrc",
11+
]
12+
}
13+
GuiLibrary {
14+
name: "cameralib"
15+
files: [
16+
"camera.cpp",
17+
"camera.h",
18+
]
19+
}
920
}

1.9.camera/window.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "window.h"
2-
#include "camera.h"
2+
#include <camera.h>
33

44
#if QT_VERSION >= 0x060000
55
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>

2.1.color/camera.cpp

Lines changed: 0 additions & 226 deletions
This file was deleted.

2.1.color/camera.h

Lines changed: 0 additions & 96 deletions
This file was deleted.

2.1.color/color.qbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import qbs
22

33
OpenGLApplication {
4+
Depends { name: "cameralib" }
45
files: [
56
"*.cpp",
67
"*.h",

2.1.color/window.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "window.h"
2-
#include "camera.h"
2+
#include <camera.h>
33

44
#if QT_VERSION >= 0x060000
55
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>

0 commit comments

Comments
 (0)