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
4#ifndef QQUICK3DPARTICLEDATA_H
5#define QQUICK3DPARTICLEDATA_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 <QVector3D>
19#include <private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23struct Color4ub {
24 uchar r = 255;
25 uchar g = 255;
26 uchar b = 255;
27 uchar a = 255;
28};
29
30struct Vector3b {
31 qint8 x = 0;
32 qint8 y = 0;
33 qint8 z = 0;
34};
35
36// Current particle data, only used for currently modified data, so one per system
45
46// Particle data per particle
47// Not modified after emits
49{
53 // Use Vector3b to reduce the memory usage, rotations work with less accuracy.
54 // These need to be qint8 and not quint8 as rotations can go either direction.
55
59 // Seconds, system time when this particle was emitted
60 float startTime = -1.0f;
61 // Seconds, particle lifetime
62 float lifetime = 0.0f;
63 // Unified scaling among axes
64 float startSize = 1.0f;
65 float endSize = 1.0f;
66 // Seconds, sprite sequence animation total time
67 float animationTime = -1.0f;
68 // Index/id of the particle. Used to get unique random values.
69 // Might not be necessary, check later
70 int index = 0;
71 // Size: 12+12+3+3+4+4+4+4+4+4 = 54 bytes
72 bool reversed = false;
73};
74
75// Data structure for storing bursts
82
83QT_END_NAMESPACE
84
85#endif // QQUICK3DPARTICLEDATA_H