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
qquick3dparticlerepeller_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 QQUICK3DPARTICLEREPELLER_H
5#define QQUICK3DPARTICLEREPELLER_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 <QtQuick3DParticles/private/qquick3dparticleaffector_p.h>
19
21
22class Q_QUICK3DPARTICLES_EXPORT QQuick3DParticleRepeller : public QQuick3DParticleAffector
23{
25 Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
26 Q_PROPERTY(float outerRadius READ outerRadius WRITE setOuterRadius NOTIFY outerRadiusChanged)
27 Q_PROPERTY(float strength READ strength WRITE setStrength NOTIFY strengthChanged)
28 QML_NAMED_ELEMENT(Repeller3D)
30public:
31 QQuick3DParticleRepeller(QQuick3DNode *parent = nullptr);
32
33 float radius() const;
34 float outerRadius() const;
35 float strength() const;
36
37public Q_SLOTS:
38 void setRadius(float radius);
39 void setOuterRadius(float radius);
40 void setStrength(float strength);
41
43 void radiusChanged();
44 void outerRadiusChanged();
45 void strengthChanged();
46
47protected:
48 void prepareToAffect() override;
49 void affectParticle(const QQuick3DParticleData &sd, QQuick3DParticleDataCurrent *d, float time) override;
50
52 float m_radius = 0.0f;
53 float m_outerRadius = 50.0f;
54 float m_strength = 50.0f;
55};
56
58
59#endif
Combined button and popup list for selecting options.
GLfloat GLfloat f
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS