33 return a >= 0 ? 1 : -1;
51 qreal newVX = curVX + (curVX * m_factor * -1 * dt);
52 qreal newVY = curVY + (curVY * m_factor * -1 * dt);
60 qreal curMag =
qSqrt(curVX*curVX + curVY*curVY);
61 if (curMag <= m_threshold +
epsilon)
63 qreal newMag =
qSqrt(newVX*newVX + newVY*newVY);
64 if (newMag <= m_threshold +
epsilon ||
68 newVX = m_threshold *
qCos(theta);
69 newVY = m_threshold *
qSin(theta);
79#include "moc_qquickfriction_p.cpp"
QQuickFrictionAffector(QQuickItem *parent=nullptr)
bool affectParticle(QQuickParticleData *d, qreal dt) override
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.
qfloat16 qSqrt(qfloat16 f)
GLboolean GLboolean GLboolean GLboolean a
[7]
static QT_BEGIN_NAMESPACE qreal sign(qreal a)
\qmltype Friction \instantiates QQuickFrictionAffector \inqmlmodule QtQuick.Particles\inherits Affect...
static const qreal epsilon
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent