Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgdebugdrawsystem_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#ifndef QSSGDEBUGDRAWSYSTEM_H
5
#define QSSGDEBUGDRAWSYSTEM_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#include <QtQuick3DRuntimeRender/private/qtquick3druntimerenderglobal_p.h>
19
#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
20
#include <QtQuick3DUtils/private/qssgbounds3_p.h>
21
#include <QtGui/QVector3D>
22
#include <QtGui/QColor>
23
24
QT_BEGIN_NAMESPACE
25
26
class
Q_QUICK3DRUNTIMERENDER_EXPORT
QSSGDebugDrawSystem
27
{
28
Q_DISABLE_COPY(
QSSGDebugDrawSystem
)
29
public
:
30
QSSGDebugDrawSystem
();
31
~QSSGDebugDrawSystem
();
32
33
bool
hasContent()
const
;
34
35
void
drawLine
(
const
QVector3D
&startPoint,
36
const
QVector3D
&endPoint,
37
const
QColor
&
color
,
38
bool
isPersistent =
false
);
39
void
drawBounds(
const
QSSGBounds3
&bounds,
40
const
QColor
&
color
,
41
bool
isPersistent =
false
);
42
void
drawPoint(
const
QVector3D
&vertex,
43
const
QColor
&
color
,
44
bool
isPersistent =
false
);
45
46
void
prepareGeometry(
QSSGRhiContext
*rhiCtx,
QRhiResourceUpdateBatch
*rub);
47
void
recordRenderDebugObjects(
QSSGRhiContext
*rhiCtx,
48
QSSGRhiGraphicsPipelineState
*ps,
49
QRhiShaderResourceBindings
*srb,
50
QRhiRenderPassDescriptor
*rpDesc);
51
52
private
:
53
struct
LineData {
54
QVector3D
startPoint;
55
QVector3D
endPoint;
56
QColor
color
;
57
};
58
struct
BoundsData {
59
QSSGBounds3
bounds;
60
QColor
color
;
61
};
62
struct
VertexData {
63
QVector3D
position
;
64
QVector3D
color
;
65
};
66
67
68
void
generateLine(
const
LineData &
line
,
QVector<VertexData>
&vertexArray,
QVector<quint32>
&indexArray);
69
void
generateBox(
const
BoundsData &bounds,
QVector<VertexData>
&vertexArray,
QVector<quint32>
&indexArray);
70
71
72
quint32
m_indexSize = 0;
73
quint32
m_pointsSize = 0;
74
QVector<LineData>
m_persistentLines;
75
QVector<LineData>
m_lines;
76
QVector<BoundsData>
m_persistentBounds;
77
QVector<BoundsData>
m_bounds;
78
QVector<VertexData>
m_persistentPoints;
79
QVector<VertexData>
m_points;
80
81
QSSGRhiBufferPtr
m_lineVertexBuffer;
82
QSSGRhiBufferPtr
m_lineIndexBuffer;
83
QSSGRhiBufferPtr
m_pointVertexBuffer;
84
};
85
86
QT_END_NAMESPACE
87
88
#endif
// QSSGDEBUGDRAWSYSTEM_H
QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition
qcolor.h:31
QList
Definition
qlist.h:74
QRhiRenderPassDescriptor
\inmodule QtGui
Definition
qrhi.h:1119
QRhiResourceUpdateBatch
\inmodule QtGui
Definition
qrhi.h:1694
QRhiShaderResourceBindings
\inmodule QtGui
Definition
qrhi.h:1190
QSSGBounds3
Class representing 3D range or axis aligned bounding box.
Definition
qssgbounds3_p.h:41
QSSGDebugDrawSystem
Definition
qssgdebugdrawsystem_p.h:27
QSSGRhiContext
Definition
qssgrhicontext_p.h:923
QVector3D
The QVector3D class represents a vector or vertex in 3D space.
Definition
qvectornd.h:171
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
color
Definition
qssgutils_p.h:103
drawLine
static bool drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps)
Definition
qcosmeticstroker.cpp:709
position
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
Definition
qquickanchors.cpp:66
QSSGRhiBufferPtr
std::shared_ptr< QSSGRhiBuffer > QSSGRhiBufferPtr
Definition
qssgrhicontext_p.h:120
quint32
unsigned int quint32
Definition
qtypes.h:45
line
QString line
Definition
src_corelib_io_qtextstream.cpp:16
QSSGRhiGraphicsPipelineState
Definition
qssgrhicontext_p.h:399
qtquick3d
src
runtimerender
qssgdebugdrawsystem_p.h
Generated by
1.9.7