summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-08-23 15:00:41 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-08-24 10:14:29 +0000
commita52648e549e23beb79c3ba0060a8e131ce22cc7d (patch)
treeea13ecc3a7e2ef6c0d8598c192ff5927ff58b742
parent58639dab0360add8ccb23ca96141113fedf39866 (diff)
Remove ill-timed viewVec-upVec check in QCamera
The check for parallel view and up vectors is well-intentioned, but it cannot be done this way: the view matrix is updated already after setting any of position, view center, or up vector. The (failing) check can thus be triggered right after setting a position or view center that (temporarily) results in a vector colinear to the (not yet final) up vector. Change-Id: I083200bf05582517880a88816b7987874810c2bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/frontend/qcamera_p.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/render/frontend/qcamera_p.h b/src/render/frontend/qcamera_p.h
index a310fc765..2ef53818c 100644
--- a/src/render/frontend/qcamera_p.h
+++ b/src/render/frontend/qcamera_p.h
@@ -69,8 +69,6 @@ public:
void updateViewMatrix()
{
- if (m_upVector.isNull() || QVector3D::crossProduct(m_cameraToCenter, m_upVector).normalized().isNull())
- qWarning() << "Camera up vector must not be colinear with the view vector";
QMatrix4x4 m;
m.lookAt(m_position, m_viewCenter, m_upVector);
m_transform->setMatrix(m);