1// Copyright (C) 2016 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_QORBITCAMERACONTROLLER_H
5#define QT3DEXTRAS_QORBITCAMERACONTROLLER_H
6
7#include <Qt3DExtras/qabstractcameracontroller.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace Qt3DExtras {
12
13class QOrbitCameraControllerPrivate;
14
15class Q_3DEXTRASSHARED_EXPORT QOrbitCameraController : public QAbstractCameraController
16{
17 Q_OBJECT
18 Q_PROPERTY(float zoomInLimit READ zoomInLimit WRITE setZoomInLimit NOTIFY zoomInLimitChanged)
19
20public:
21 explicit QOrbitCameraController(Qt3DCore::QNode *parent = nullptr);
22 ~QOrbitCameraController();
23
24 float zoomInLimit() const;
25
26 void setZoomInLimit(float zoomInLimit);
27
28Q_SIGNALS:
29 void zoomInLimitChanged();
30
31protected:
32 QOrbitCameraController(QOrbitCameraControllerPrivate &dd, Qt3DCore::QNode *parent = nullptr);
33
34private:
35 void moveCamera(const QAbstractCameraController::InputState &state, float dt) override;
36
37private:
38 Q_DECLARE_PRIVATE(QOrbitCameraController)
39};
40
41} // Qt3DExtras
42
43QT_END_NAMESPACE
44
45#endif // QT3DEXTRAS_QORBITCAMERACONTROLLER_H
46

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