27 Q_PROPERTY(
float radius READ radius WRITE setRadius NOTIFY radiusChanged)
28 Q_PROPERTY(
float outerRadius READ outerRadius WRITE setOuterRadius NOTIFY outerRadiusChanged)
29 Q_PROPERTY(
float strength READ strength WRITE setStrength NOTIFY strengthChanged)
30 QML_NAMED_ELEMENT(Repeller3D)
31 QML_ADDED_IN_VERSION(6, 4)
33 QQuick3DParticleRepeller(QQuick3DNode *parent =
nullptr);
36 float outerRadius()
const;
37 float strength()
const;
40 void setRadius(
float radius);
41 void setOuterRadius(
float radius);
42 void setStrength(
float strength);
46 void outerRadiusChanged();
47 void strengthChanged();
50 void prepareToAffect() override;
51 void affectParticle(
const QQuick3DParticleData &sd, QQuick3DParticleDataCurrent *d,
float time) override;
54 float m_radius = 0.0f;
55 float m_outerRadius = 50.0f;
56 float m_strength = 50.0f;
static float qt_smoothstep(float edge0, float edge1, float x)