summaryrefslogtreecommitdiffstats
path: root/demos/boxes/trackball.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-04 00:56:40 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-04 01:40:18 (GMT)
commit79c6049ccaae4434add40d35b3e47a83ff4a102a (patch)
treeb7dc1277998c24780bedb095af94a3ef465d5315 /demos/boxes/trackball.cpp
parentedc9acd6a0c082b7d6c7810700e77a9d990014c6 (diff)
downloadQt-79c6049ccaae4434add40d35b3e47a83ff4a102a.zip
Qt-79c6049ccaae4434add40d35b3e47a83ff4a102a.tar.gz
Qt-79c6049ccaae4434add40d35b3e47a83ff4a102a.tar.bz2
Incorporate API review feedback for math3d classes.
Reviewed-by: Sarah Smith
Diffstat (limited to 'demos/boxes/trackball.cpp')
-rw-r--r--demos/boxes/trackball.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/boxes/trackball.cpp b/demos/boxes/trackball.cpp
index 2b1b2e4..76324e6 100644
--- a/demos/boxes/trackball.cpp
+++ b/demos/boxes/trackball.cpp
@@ -93,7 +93,7 @@ void TrackBall::move(const QPointF& p, const QQuaternion &transformation)
QLineF delta(m_lastPos, p);
m_angularVelocity = 180*delta.length() / (PI*msecs);
m_axis = QVector3D(-delta.dy(), delta.dx(), 0.0f).normalized();
- m_axis = transformation.rotateVector(m_axis);
+ m_axis = transformation.rotatedVector(m_axis);
m_rotation = QQuaternion::fromAxisAndAngle(m_axis, 180 / PI * delta.length()) * m_rotation;
}
break;
@@ -118,7 +118,7 @@ void TrackBall::move(const QPointF& p, const QQuaternion &transformation)
m_angularVelocity = angle / msecs;
m_axis.normalize();
- m_axis = transformation.rotateVector(m_axis);
+ m_axis = transformation.rotatedVector(m_axis);
m_rotation = QQuaternion::fromAxisAndAngle(m_axis, angle) * m_rotation;
}
break;