Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dperspectivecamera_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSGPERSPECTIVECAMERA_H
5#define QSSGPERSPECTIVECAMERA_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 purely as an
12// implementation detail. 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 <QtQuick3D/private/qquick3dcamera_p.h>
19
21
22struct QSSGRenderCamera;
23class Q_QUICK3D_EXPORT QQuick3DPerspectiveCamera : public QQuick3DCamera
24{
26 Q_PROPERTY(float clipNear READ clipNear WRITE setClipNear NOTIFY clipNearChanged)
27 Q_PROPERTY(float clipFar READ clipFar WRITE setClipFar NOTIFY clipFarChanged)
28 Q_PROPERTY(float fieldOfView READ fieldOfView WRITE setFieldOfView NOTIFY fieldOfViewChanged)
29 Q_PROPERTY(FieldOfViewOrientation fieldOfViewOrientation READ fieldOfViewOrientation WRITE setFieldOfViewOrientation NOTIFY fieldOfViewOrientationChanged)
30
31 QML_NAMED_ELEMENT(PerspectiveCamera)
32
33public:
36 Horizontal
37 };
38 Q_ENUM(FieldOfViewOrientation)
39
41
42 float clipNear() const;
43 float clipFar() const;
44 float fieldOfView() const;
45 FieldOfViewOrientation fieldOfViewOrientation() const;
46
47public Q_SLOTS:
48 void setClipNear(float clipNear);
49 void setClipFar(float clipFar);
50 void setFieldOfView(float fieldOfView);
51 void setFieldOfViewOrientation(QQuick3DPerspectiveCamera::FieldOfViewOrientation fieldOfViewOrientation);
52
58
59protected:
62
63private:
64 float m_clipNear = 10.0f;
65 float m_clipFar = 10000.0f;
66 float m_fieldOfView = 60.0f;
67 FieldOfViewOrientation m_fieldOfViewOrientation = Vertical;
68};
69
71
72#endif // QSSGPERSPECTIVECAMERA_H
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent