74 , m_physics(Velocity), m_proportionalToDistance(
Linear)
80 if (m_strength == 0.0)
84 qreal r = std::sqrt((dx*dx) + (dy*dy));
85 qreal theta = std::atan2(dy,dx);
87 switch (m_proportionalToDistance){
89 ds = (m_strength / qMax<qreal>(1.,
r*
r));
92 ds = (m_strength / qMax<qreal>(1.,
r));
95 ds = (m_strength * qMax<qreal>(1.,
r*
r));
98 ds = (m_strength * qMax<qreal>(1.,
r));
104 dx = ds * std::cos(theta);
105 dy = ds * std::sin(theta);
120 d->setInstantaneousVX(vx + dx,
m_system);
121 d->setInstantaneousVY(vy + dy,
m_system);
128#include "moc_qquickpointattractor_p.cpp"
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
bool affectParticle(QQuickParticleData *d, qreal dt) override
QQuickAttractorAffector(QQuickItem *parent=nullptr)
\qmltype Attractor \instantiates QQuickAttractorAffector \inqmlmodule QtQuick.Particles\inherits Affe...
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QQuickParticleSystem * m_system
Combined button and popup list for selecting options.
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent