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)
29 QML_ADDED_IN_VERSION(6, 4)
31 QQuick3DParticleRepeller(QQuick3DNode *parent =
nullptr);
34 float outerRadius()
const;
35 float strength()
const;
38 void setRadius(
float radius);
39 void setOuterRadius(
float radius);
40 void setStrength(
float strength);
44 void outerRadiusChanged();
45 void strengthChanged();
48 void prepareToAffect() override;
49 void affectParticle(
const QQuick3DParticleData &sd, QQuick3DParticleDataCurrent *d,
float time) override;
52 float m_radius = 0.0f;
53 float m_outerRadius = 50.0f;
54 float m_strength = 50.0f;
static float qt_smoothstep(float edge0, float edge1, float x)