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
qssgrendermesh_p.h
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6
7#ifndef QSSG_RENDER_MESH_H
8#define QSSG_RENDER_MESH_H
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
21#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
22
23#include <QtQuick3DUtils/private/qssgbounds3_p.h>
24#include <QtQuick3DUtils/private/qssgmeshbvh_p.h>
25
27
29{
32 QSSGBounds3 bounds; // Vertex buffer bounds
34 struct {
39 } rhi;
40
41 struct Lod {
44 float distance = 0.0f;
45 };
47
48 QSSGRenderSubset() = default;
59 {
60 if (this != &inOther) {
61 count = inOther.count;
62 offset = inOther.offset;
63 bounds = inOther.bounds;
64 bvhRoot = inOther.bvhRoot;
65 rhi = inOther.rhi;
66 lods = inOther.lods;
67 }
68 return *this;
69 }
70
71 quint32 lodCount(int lodLevel) const {
72 if (lodLevel == 0 || lods.isEmpty())
73 return count;
74 if (lodLevel > lods.count())
75 lodLevel = lods.count() - 1;
76 else
77 lodLevel -= 1;
78
79 return lods[lodLevel].count;
80 }
81
82 quint32 lodOffset(int lodLevel) const {
83 if (lodLevel == 0 || lods.isEmpty())
84 return offset;
85 if (lodLevel > lods.count())
86 lodLevel = lods.count() - 1;
87 else
88 lodLevel -= 1;
89
90 return lods[lodLevel].offset;
91 }
92
93};
94
110QT_END_NAMESPACE
111
112#endif
Combined button and popup list for selecting options.
QSSGRenderMesh(QSSGRenderDrawMode inDrawMode, QSSGRenderWinding inWinding)
std::unique_ptr< QSSGMeshBVH > bvh
QSSGRenderDrawMode drawMode
QSSGRenderWinding winding
QSSGRhiBufferPtr indexBuffer
QSSGRhiInputAssemblerState ia
quint32 lodOffset(int lodLevel) const
QSSGMeshBVHNode::Handle bvhRoot
quint32 lodCount(int lodLevel) const
QVector< Lod > lods
QSSGRenderSubset & operator=(const QSSGRenderSubset &inOther)
QRhiTexture * targetsTexture
QSSGRhiBufferPtr vertexBuffer
QSSGRenderSubset(const QSSGRenderSubset &inOther)
QSSGRenderSubset()=default