1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_P_H
5#define QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DExtras/qabstractcameracontroller.h>
19#include <QtGui/QVector3D>
20
21#include <Qt3DCore/private/qentity_p.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace Qt3DRender {
26class QCamera;
27}
28
29namespace Qt3DLogic {
30class QFrameAction;
31}
32
33namespace Qt3DInput {
34class QKeyboardDevice;
35class QMouseDevice;
36class QLogicalDevice;
37class QAction;
38class QActionInput;
39class QAxis;
40class QAnalogAxisInput;
41class QButtonAxisInput;
42class QAxisActionHandler;
43}
44
45namespace Qt3DExtras {
46
47class QAbstractCameraControllerPrivate : public Qt3DCore::QEntityPrivate
48{
49public:
50 QAbstractCameraControllerPrivate();
51
52 void init();
53 void applyInputAccelerations();
54
55 Qt3DRender::QCamera *m_camera;
56
57 Qt3DInput::QAction *m_leftMouseButtonAction;
58 Qt3DInput::QAction *m_middleMouseButtonAction;
59 Qt3DInput::QAction *m_rightMouseButtonAction;
60 Qt3DInput::QAction *m_altButtonAction;
61 Qt3DInput::QAction *m_shiftButtonAction;
62 Qt3DInput::QAction *m_escapeButtonAction;
63
64 Qt3DInput::QAxis *m_rxAxis;
65 Qt3DInput::QAxis *m_ryAxis;
66 Qt3DInput::QAxis *m_txAxis;
67 Qt3DInput::QAxis *m_tyAxis;
68 Qt3DInput::QAxis *m_tzAxis;
69
70 Qt3DInput::QActionInput *m_leftMouseButtonInput;
71 Qt3DInput::QActionInput *m_middleMouseButtonInput;
72 Qt3DInput::QActionInput *m_rightMouseButtonInput;
73 Qt3DInput::QActionInput *m_altButtonInput;
74 Qt3DInput::QActionInput *m_shiftButtonInput;
75 Qt3DInput::QActionInput *m_escapeButtonInput;
76
77 Qt3DInput::QAnalogAxisInput *m_mouseRxInput;
78 Qt3DInput::QAnalogAxisInput *m_mouseRyInput;
79 Qt3DInput::QAnalogAxisInput *m_mouseTzXInput;
80 Qt3DInput::QAnalogAxisInput *m_mouseTzYInput;
81 Qt3DInput::QButtonAxisInput *m_keyboardTxPosInput;
82 Qt3DInput::QButtonAxisInput *m_keyboardTyPosInput;
83 Qt3DInput::QButtonAxisInput *m_keyboardTzPosInput;
84 Qt3DInput::QButtonAxisInput *m_keyboardTxNegInput;
85 Qt3DInput::QButtonAxisInput *m_keyboardTyNegInput;
86 Qt3DInput::QButtonAxisInput *m_keyboardTzNegInput;
87
88 Qt3DInput::QKeyboardDevice *m_keyboardDevice;
89 Qt3DInput::QMouseDevice *m_mouseDevice;
90
91 Qt3DInput::QLogicalDevice *m_logicalDevice;
92
93 Qt3DLogic::QFrameAction *m_frameAction;
94
95 float m_linearSpeed;
96 float m_lookSpeed;
97
98 float m_acceleration;
99 float m_deceleration;
100
101 QVector3D m_sceneUp;
102
103 Q_DECLARE_PUBLIC(QAbstractCameraController)
104};
105
106} // namespace Qt3DExtras
107
108QT_END_NAMESPACE
109
110#endif // QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_P_H
111

source code of qt3d/src/extras/defaults/qabstractcameracontroller_p.h