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
qssgrendergraphobject_p.h
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2023 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QSSGRENDERGRAPHOBJECT_P_H
6#define QSSGRENDERGRAPHOBJECT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <ssg/qssgrendergraphobject.h>
20
21#include <ssg/qssgrenderbasetypes.h>
22
23#include <QtQuick3DUtils/private/qssgassert_p.h>
24
31
32template <typename T = QSSGRenderGraphObject>
34{
35 return static_cast<T *>(reinterpret_cast<QSSGRenderGraphObject *>(resId));
36}
37
43
44template <typename T = QSSGRenderGraphObject>
46{
47 return static_cast<T *>(reinterpret_cast<QSSGRenderGraphObject *>(nodeId));
48}
49
55
56template <typename T = QSSGRenderGraphObject>
58{
59 return static_cast<T *>(reinterpret_cast<QSSGRenderGraphObject *>(cameraId));
60}
61
67
68template <typename T = QSSGRenderGraphObject>
70{
71 return static_cast<T *>(reinterpret_cast<QSSGRenderGraphObject *>(extensionId));
72}
73
74template <typename QSSGTypeId>
75constexpr bool isNull(QSSGTypeId id) { return (id == QSSGTypeId::Invalid); }
76}
77
78#endif // QSSGRENDERGRAPHOBJECT_P_H
static constexpr bool isCamera(Type type) noexcept
static constexpr bool isNodeType(Type type) noexcept
static constexpr bool isExtension(Type type) noexcept
static constexpr bool isResource(Type type) noexcept
constexpr QSSGCameraId getCameraId(const QSSGRenderGraphObject &o)
constexpr QSSGResourceId getResourceId(const QSSGRenderGraphObject &o)
T * getExtension(QSSGExtensionId extensionId)
T * getResource(QSSGResourceId resId)
constexpr QSSGExtensionId getExtensionId(const QSSGRenderGraphObject &o)
constexpr bool isNull(QSSGTypeId id)
T * getCamera(QSSGCameraId cameraId)
constexpr QSSGNodeId getNodeId(const QSSGRenderGraphObject &o)
#define QSSG_ASSERT(cond, action)
QSSGExtensionId
size_t quintptr
Definition qtypes.h:167