diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-06-21 12:02:08 +1000 |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-06-21 12:02:08 +1000 |
commit | f0ab52c313076fce7e854fd494b88c5dd0f71af5 (patch) | |
tree | 5e1ccd832abe0eae761c69627fd20a039ffd362c /src/declarative/particles/qsgpointattractor.cpp | |
parent | 7126b27f5dfeba005cc7f17610bcc09cf0003b52 (diff) |
Rewrite last rewrite
Also rewrite to have all particle state shared, not just common
elements.
Diffstat (limited to 'src/declarative/particles/qsgpointattractor.cpp')
-rw-r--r-- | src/declarative/particles/qsgpointattractor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/particles/qsgpointattractor.cpp b/src/declarative/particles/qsgpointattractor.cpp index 4c675237ba..0ee2fa4c27 100644 --- a/src/declarative/particles/qsgpointattractor.cpp +++ b/src/declarative/particles/qsgpointattractor.cpp @@ -70,17 +70,17 @@ bool QSGPointAttractorAffector::affectParticle(QSGParticleData *d, qreal dt) dy = ds * sin(theta); switch(m_physics){ case Position: - d->pv.x = (d->pv.x + dx); - d->pv.y = (d->pv.y + dy); + d->x = (d->x + dx); + d->y = (d->y + dy); break; case Acceleration: - d->setInstantaneousAX(d->pv.ax + dx); - d->setInstantaneousAY(d->pv.ay + dy); + d->setInstantaneousAX(d->ax + dx); + d->setInstantaneousAY(d->ay + dy); break; case Velocity: //also default default: - d->setInstantaneousSX(d->pv.sx + dx); - d->setInstantaneousSY(d->pv.sy + dy); + d->setInstantaneousSX(d->sx + dx); + d->setInstantaneousSY(d->sy + dy); } return true; |