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
qquick3dextensionhelpers.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 QQUICK3DEXTENSIONHELPERS_H
5#define QQUICK3DEXTENSIONHELPERS_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QtQuick3D API, with limited compatibility guarantees.
12// Usage of this API may make your code source and binary incompatible with
13// future versions of Qt.
14//
15
16#include <QtQuick3D/qtquick3dglobal.h>
17#include <ssg/qssgrenderbasetypes.h>
18#include <ssg/qssgrendergraphobject.h>
19
20QT_BEGIN_NAMESPACE
21
22class QQuick3DObject;
23
24#ifdef Q_QDOC
25typedef quint64 QSSGNodeId;
26typedef quint64 QSSGResourceId;
27typedef quint64 QSSGCameraId;
28typedef quint64 QSSGExtensionId;
29#endif
30
31class Q_QUICK3D_EXPORT QQuick3DExtensionHelpers
32{
33public:
34 QQuick3DExtensionHelpers();
35
36 [[nodiscard]] static QSSGNodeId getNodeId(const QQuick3DObject &node);
37 [[nodiscard]] static QSSGResourceId getResourceId(const QQuick3DObject &resource);
38 [[nodiscard]] static QSSGCameraId getCameraId(const QQuick3DObject &camera);
39 [[nodiscard]] static QSSGExtensionId getExtensionId(const QQuick3DObject &extension);
40
41 [[nodiscard]] static QSSGRenderGraphObject::Type getNodeIdType(QSSGNodeId nodeId);
42
43 template<typename QSSGTypeId>
44 [[nodiscard]] static constexpr bool isNull(QSSGTypeId id) { return (id == QSSGTypeId::Invalid); }
45};
46
47QT_END_NAMESPACE
48
49#endif // QQUICK3DEXTENSIONHELPERS_H