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
qquick3dparticledata_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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#ifndef QQUICK3DPARTICLEDATA_H
7#define QQUICK3DPARTICLEDATA_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QVector3D>
21#include <private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25struct Color4ub {
26 uchar r = 255;
27 uchar g = 255;
28 uchar b = 255;
29 uchar a = 255;
30};
31
32struct Vector3b {
33 qint8 x = 0;
34 qint8 y = 0;
35 qint8 z = 0;
36};
37
38// Current particle data, only used for currently modified data, so one per system
47
48// Particle data per particle
49// Not modified after emits
51{
55 // Use Vector3b to reduce the memory usage, rotations work with less accuracy.
56 // These need to be qint8 and not quint8 as rotations can go either direction.
57
61 // Seconds, system time when this particle was emitted
62 float startTime = -1.0f;
63 // Seconds, particle lifetime
64 float lifetime = 0.0f;
65 // Unified scaling among axes
66 float startSize = 1.0f;
67 float endSize = 1.0f;
68 // Seconds, sprite sequence animation total time
69 float animationTime = -1.0f;
70 // Index/id of the particle. Used to get unique random values.
71 // Might not be necessary, check later
72 int index = 0;
73 // Size: 12+12+3+3+4+4+4+4+4+4 = 54 bytes
74 bool reversed = false;
75};
76
77// Data structure for storing bursts
84
85QT_END_NAMESPACE
86
87#endif // QQUICK3DPARTICLEDATA_H