Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopenxrspatialanchor_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QOPENXRSPATIALANCHOR_H
5#define QOPENXRSPATIALANCHOR_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 <QtQuick3DXr/qtquick3dxrglobal.h>
19
20#include <QtQuick3D/private/qquick3dnode_p.h>
21
22#include <QQmlEngine>
23#include <QUuid>
24
25#include <openxr/openxr.h>
26
28
30{
41 Q_PROPERTY(QUuid uuid READ uuid CONSTANT)
42 QML_NAMED_ELEMENT(XrSpatialAnchor)
43 QML_UNCREATABLE("Spatial anchor objects cannot be created in QML");
44public:
45 QOpenXRSpatialAnchor(XrSpace space, QUuid &uuid, QObject *parent = nullptr);
47
48 XrSpace space() const;
49
50 QVector3D offset3D() const;
51 void setOffset3D(const QVector3D &newOffset);
52
53 QVector3D extent3D() const;
54 void setExtent3D(const QVector3D &newExtent);
55
56 QVector3D position() const;
57 void setPosition(const QVector3D &newPosition);
58
59 QQuaternion rotation() const;
60 void setRotation(const QQuaternion &newRotation);
61
62 QString semanticLabels() const;
63 void setSemanticLabels(const QString &newSemanticLabels);
64
65 bool has2DBounds() const;
66 bool has3DBounds() const;
67
68 QVector2D offset2D() const;
69 QVector2D extent2D() const;
70
71 QUuid uuid() const;
72
83
85 XrSpace m_space = XR_NULL_HANDLE;
86 QUuid m_uuid;
87 QVector3D m_offset3D;
88 QVector3D m_extent3D;
89 QVector3D m_position;
90 QQuaternion m_rotation;
91 QString m_semanticLabels;
92 QSet<QUuid> m_roomLayoutUuids;
93 QSet<QUuid> m_spaceContainerUuids;
94 bool m_has2DBounds;
95 bool m_has3DBounds;
96 QVector2D m_offset2D;
97 QVector2D m_extent2D;
98};
99
101
102#endif // QOPENXRSPATIALANCHOR_H
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
void setExtent3D(const QVector3D &newExtent)
void setSemanticLabels(const QString &newSemanticLabels)
void setOffset3D(const QVector3D &newOffset)
void setRotation(const QQuaternion &newRotation)
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Definition qset.h:18
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition quuid.h:31
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:31
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
n void setPosition(void) \n\
GLuint in
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define signals