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
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
5#ifndef QSSG_RENDER_MODEL_H
6#define QSSG_RENDER_MODEL_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 <QtQuick3DRuntimeRender/private/qssgrendernode_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrendermesh_p.h>
21#include <QtQuick3DRuntimeRender/private/qssgrendergeometry_p.h>
22#include <QtQuick3DRuntimeRender/private/qssgrenderskeleton_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrenderskin_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrenderinstancetable_p.h>
25
26#include <QtQuick3DUtils/private/qssgbounds3_p.h>
27#include <QtCore/QVector>
28
30
34class QRhiTexture;
35
36struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderModel : public QSSGRenderNode
37{
38 QVector<QSSGRenderGraphObject *> materials;
39 QVector<QSSGRenderGraphObject *> morphTargets;
40 QSSGRenderGeometry *geometry = nullptr;
42 QSSGRenderSkeleton *skeleton = nullptr;
43 QSSGRenderSkin *skin = nullptr;
44 QVector<QMatrix4x4> inverseBindPoses;
45 float m_depthBiasSq = 0.0f; // Depth bias is expected to be squared!
46 bool castsShadows = true;
47 bool receivesShadows = true;
48 float instancingLodMin = -1;
49 float instancingLodMax = -1;
50
51 QSSGRenderInstanceTable *instanceTable = nullptr;
52 int instanceCount() const { return instanceTable ? instanceTable->count() : 0; }
53 bool instancing() const { return instanceTable;}
54
55 QSSGParticleBuffer *particleBuffer = nullptr;
57 bool hasTransparency = false;
58
59 QVector<float> morphWeights;
60 QVector<quint32> morphAttributes;
61
62 bool receivesReflections = false;
63 bool castsReflections = true;
64 bool usedInBakedLighting = false;
67 uint lightmapBaseResolution = 0;
68 bool hasLightmap() const { return !lightmapKey.isEmpty(); }
69 bool usesBoneTexture() const { return ((skin != nullptr) || (skeleton != nullptr)); }
70
71 float levelOfDetailBias = 1.0f; // values < 1.0 will decrease usage of LODs, values > 1.0 will increase usage of LODs
72
74};
76
77#endif
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtGui
Definition qrhi.h:895
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
Combined button and popup list for selecting options.
unsigned int uint
Definition qtypes.h:34
QSSGRenderPath meshPath
int instanceCount() const
QMatrix4x4 particleMatrix
bool instancing() const
QVector< float > morphWeights
QVector< quint32 > morphAttributes
bool usesBoneTexture() const
QVector< QSSGRenderGraphObject * > morphTargets
bool hasLightmap() const
QVector< QMatrix4x4 > inverseBindPoses
QVector< QSSGRenderGraphObject * > materials