diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-06-25 12:01:46 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-29 02:21:36 +0200 |
commit | 5df94d89033e7bbb3f41840a4c07a628ed66b4d5 (patch) | |
tree | e42bcd16d8f5f3a192c48794b610ffeb05b9dc02 /src/particles/qquicktrailemitter.cpp | |
parent | 2241d6fa2d39fe890ba0d17ff58b5e0615c1cd7b (diff) |
Rename speed -> velocity in the particle system
Matches the convention set in the QtQuick module, for example by
ListView and Flickable.
Change-Id: I8df57ed1ced8128723d790c30c00cc1b2062787d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/particles/qquicktrailemitter.cpp')
-rw-r--r-- | src/particles/qquicktrailemitter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/particles/qquicktrailemitter.cpp b/src/particles/qquicktrailemitter.cpp index 5f094105e1..86d0c16b8b 100644 --- a/src/particles/qquicktrailemitter.cpp +++ b/src/particles/qquicktrailemitter.cpp @@ -80,12 +80,12 @@ QQuickTrailEmitter::QQuickTrailEmitter(QQuickItem *parent) : The type of logical particle which this is emitting from. */ /*! - \qmlproperty qreal QtQuick.Particles2::TrailEmitter::speedFromMovement + \qmlproperty qreal QtQuick.Particles2::TrailEmitter::velocityFromMovement If this value is non-zero, then any movement of the emitter will provide additional starting velocity to the particles based on the movement. The additional vector will be the same angle as the emitter's movement, with a magnitude that is the magnitude of the emitters - movement multiplied by speedFromMovement. + movement multiplied by velocityFromMovement. Default value is 0. */ @@ -170,7 +170,7 @@ void QQuickTrailEmitter::emitWindow(int timeStamp) } } - //TODO: Implement startTime and speedFromMovement + //TODO: Implement startTime and velocityFromMovement qreal time = timeStamp / 1000.; qreal particleRatio = 1. / m_particlesPerParticlePerSecond; qreal pt; @@ -229,12 +229,12 @@ void QQuickTrailEmitter::emitWindow(int timeStamp) datum->x = newPos.x(); datum->y = newPos.y(); - // Particle speed - const QPointF &speed = m_speed->sample(newPos); - datum->vx = speed.x() - + m_speed_from_movement * d->vx; - datum->vy = speed.y() - + m_speed_from_movement * d->vy; + // Particle velocity + const QPointF &velocity = m_velocity->sample(newPos); + datum->vx = velocity.x() + + m_velocity_from_movement * d->vx; + datum->vy = velocity.y() + + m_velocity_from_movement * d->vy; // Particle acceleration const QPointF &accel = m_acceleration->sample(newPos); |