Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qssgrenderinstancetable_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
6
7
#
ifndef
QSSGRENDERINDEXTABLE_P_H
8
#
define
QSSGRENDERINDEXTABLE_P_H
9
10
11
//
12
// W A R N I N G
13
// -------------
14
//
15
// This file is not part of the Qt API. It exists purely as an
16
// implementation detail. This header file may change from version to
17
// version without notice, or even be removed.
18
//
19
// We mean it.
20
//
21
22
#
include
<
QtQuick3DRuntimeRender
/
private
/
qssgrendergraphobject_p
.
h
>
23
24
#
include
<
QtGui
/
qvectornd
.
h
>
25
#
include
<
QtGui
/
qmatrix4x4
.
h
>
26
27
QT_BEGIN_NAMESPACE
28
29
struct
Q_QUICK3DRUNTIMERENDER_EXPORT
QSSGRenderInstanceTableEntry
{
30
QVector4D row0;
31
QVector4D row1;
32
QVector4D row2;
33
QVector4D color;
34
QVector4D instanceData;
35
};
36
37
struct
Q_QUICK3DRUNTIMERENDER_EXPORT
QSSGRenderInstanceTable
:
public
QSSGRenderGraphObject
38
{
39
QSSGRenderInstanceTable() : QSSGRenderGraphObject(QSSGRenderGraphObject::Type::ModelInstance, FlagT(Flags::HasGraphicsResources)) {}
40
41
int
count()
const
{
return
instanceCount; }
42
qsizetype dataSize()
const
{
return
table.size(); }
43
const
void
*constData()
const
{
return
table.constData(); }
44
void
setData(
const
QByteArray &data,
int
count,
int
stride) { table = data; instanceCount = count; instanceStride = stride; ++instanceSerial; }
45
void
setInstanceCountOverride(
int
count) { instanceCount = count; }
46
int
serial()
const
{
return
instanceSerial; }
47
int
stride()
const
{
return
instanceStride; }
48
bool
hasTransparency() {
return
transparency; }
49
void
setHasTransparency(
bool
t) { transparency = t; }
50
void
setDepthSorting(
bool
enable) { depthSorting = enable; }
51
bool
isDepthSortingEnabled() {
return
depthSorting; }
52
QMatrix4x4 getTransform(
int
index)
const
;
53
void
setShadowBoundsMinimum(
const
QVector3D &value) { shadowBoundsMinimum = value; }
54
void
setShadowBoundsMaximum(
const
QVector3D &value) { shadowBoundsMaximum = value; }
55
QVector3D getShadowBoundsMinimum()
const
{
return
shadowBoundsMinimum; }
56
QVector3D getShadowBoundsMaximum()
const
{
return
shadowBoundsMaximum; }
57
58
private
:
59
int
instanceCount = 0;
60
int
instanceSerial = 0;
61
int
instanceStride = 0;
62
bool
transparency =
false
;
63
bool
depthSorting =
false
;
64
QVector3D shadowBoundsMinimum = QVector3D(1, 1, 1);
65
QVector3D shadowBoundsMaximum = QVector3D(-1, -1, -1);
66
QByteArray table;
67
};
68
69
QT_END_NAMESPACE
70
71
#
endif
// QSSGRENDERINDEXTABLE_P_H
QMatrix4x4
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition
qmatrix4x4.h:28
QSSGRenderInstanceTableEntry
Definition
qssgrenderinstancetable_p.h:29
QSSGRenderInstanceTable
Definition
qssgrenderinstancetable_p.h:38
qtquick3d
src
runtimerender
graphobjects
qssgrenderinstancetable_p.h
Generated on
for Qt by
1.18.0