Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dorthographiccamera_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// Qt-Security score:significant reason:default
4
5
6#ifndef QSSGORTHOGRAPHICCAMERA_H
7#define QSSGORTHOGRAPHICCAMERA_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3D/private/qquick3dcamera_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class QSSGRenderCamera;
25class Q_QUICK3D_EXPORT QQuick3DOrthographicCamera : public QQuick3DCamera
26{
27 Q_OBJECT
28 Q_PROPERTY(float clipNear READ clipNear WRITE setClipNear NOTIFY clipNearChanged)
29 Q_PROPERTY(float clipFar READ clipFar WRITE setClipFar NOTIFY clipFarChanged)
30 Q_PROPERTY(float horizontalMagnification READ horizontalMagnification WRITE setHorizontalMagnification NOTIFY horizontalMagnificationChanged)
31 Q_PROPERTY(float verticalMagnification READ verticalMagnification WRITE setVerticalMagnification NOTIFY verticalMagnificationChanged)
32
33 QML_NAMED_ELEMENT(OrthographicCamera)
34
35public:
36 explicit QQuick3DOrthographicCamera(QQuick3DNode *parent = nullptr);
37
38 float clipNear() const;
39 float clipFar() const;
40 float horizontalMagnification() const;
41 float verticalMagnification() const;
42
43public Q_SLOTS:
44 void setClipNear(float clipNear);
45 void setClipFar(float clipFar);
46 void setHorizontalMagnification(float horizontalMagnification);
47 void setVerticalMagnification(float horizontalMagnification);
48
49Q_SIGNALS:
50 void clipNearChanged();
51 void clipFarChanged();
52 void horizontalMagnificationChanged();
53 void verticalMagnificationChanged();
54
55protected:
56 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
57
58private:
59 float m_clipNear = 10.0f;
60 float m_clipFar = 10000.0f;
61 float m_horizontalMagnification = 1.0f;
62 float m_verticalMagnification = 1.0f;
63};
64
65QT_END_NAMESPACE
66
67#endif // QSSGORTHOGRAPHICCAMERA_H
Combined button and popup list for selecting options.