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
qssgrendermodel_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_MODEL_H
8#define QSSG_RENDER_MODEL_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/qssgrendernode_p.h>
22#include <QtQuick3DRuntimeRender/private/qssgrendermesh_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrendergeometry_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrenderskeleton_p.h>
25#include <QtQuick3DRuntimeRender/private/qssgrenderskin_p.h>
26#include <QtQuick3DRuntimeRender/private/qssgrenderinstancetable_p.h>
27
28#include <QtQuick3DUtils/private/qssgbounds3_p.h>
29#include <QtCore/QVector>
30
32
33struct QSSGRenderDefaultMaterial;
34struct QSSGParticleBuffer;
35class QSSGBufferManager;
36class QRhiTexture;
37
38struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderModel : public QSSGRenderNode
39{
40 QVector<QSSGRenderGraphObject *> materials;
41 QVector<QSSGRenderGraphObject *> morphTargets;
42 QSSGRenderGeometry *geometry = nullptr;
43 QSSGRenderPath meshPath;
44 QSSGRenderSkeleton *skeleton = nullptr;
45 QSSGRenderSkin *skin = nullptr;
46 QVector<QMatrix4x4> inverseBindPoses;
47 float m_depthBiasSq = 0.0f; // Depth bias is expected to be squared!
48 bool castsShadows = true;
49 bool receivesShadows = true;
50 float instancingLodMin = -1;
51 float instancingLodMax = -1;
52
53 QSSGRenderInstanceTable *instanceTable = nullptr;
54 int instanceCount() const { return instanceTable ? instanceTable->count() : 0; }
55 bool instancing() const { return instanceTable;}
56
57 QSSGParticleBuffer *particleBuffer = nullptr;
58 QMatrix4x4 particleMatrix;
59 bool hasTransparency = false;
60
61 QVector<float> morphWeights;
62 QVector<quint32> morphAttributes;
63
64 bool receivesReflections = false;
65 bool castsReflections = true;
66 bool usedInBakedLighting = false;
67 QString lightmapKey;
68 float texelsPerUnit = 0.0f;
69 bool motionVectorEnabled = true;
70 float motionVectorScale = 1.0f;
71 bool hasLightmap() const { return !lightmapKey.isEmpty(); }
72 bool usesBoneTexture() const { return ((skin != nullptr) || (skeleton != nullptr)); }
73
74 float levelOfDetailBias = 1.0f; // values < 1.0 will decrease usage of LODs, values > 1.0 will increase usage of LODs
75
76 QSSGRenderModelHandle mh;
77
78 QSSGRenderModel();
79};
80QT_END_NAMESPACE
81
82#endif
Combined button and popup list for selecting options.