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