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 mutable int instanceLodCount = -1;
53
54 QSSGRenderInstanceTable *instanceTable = nullptr;
55 int instanceCount() const { return instanceTable ? (instanceLodCount >= 0) ? instanceLodCount : instanceTable->count() : 0; }
56 bool instancing() const { return instanceTable;}
57
58 QSSGParticleBuffer *particleBuffer = nullptr;
59 QMatrix4x4 particleMatrix;
60 bool hasTransparency = false;
61
62 QVector<float> morphWeights;
63 QVector<quint32> morphAttributes;
64
65 bool receivesReflections = false;
66 bool castsReflections = true;
67 bool usedInBakedLighting = false;
68 QString lightmapKey;
69 float texelsPerUnit = 0.0f;
70 bool motionVectorEnabled = true;
71 float motionVectorScale = 1.0f;
72 bool hasLightmap() const { return !lightmapKey.isEmpty(); }
73 bool usesBoneTexture() const { return ((skin != nullptr) || (skeleton != nullptr)); }
74
75 float levelOfDetailBias = 1.0f; // values < 1.0 will decrease usage of LODs, values > 1.0 will increase usage of LODs
76
77 QSSGRenderModelHandle mh;
78
79 QSSGRenderModel();
80};
81QT_END_NAMESPACE
82
83#endif
Combined button and popup list for selecting options.