[Libreoffice-commits] core.git: avmedia/source
Zolnai Tamás
tamas.zolnai at collabora.com
Thu Jul 3 09:12:33 PDT 2014
avmedia/source/opengl/oglwindow.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 09fe9db46615265c6c7119f2524d19335d0e0283
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Thu Jul 3 18:07:58 2014 +0200
glTF: improve camera movement constraint
Stop moving only on the wrong direction.
Change-Id: Ic9e7f2e7814d9adcbcf707e7fb786bf17fac3125
diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx
index b3b1777..9060145 100644
--- a/avmedia/source/opengl/oglwindow.cxx
+++ b/avmedia/source/opengl/oglwindow.cxx
@@ -266,7 +266,8 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent)
{
// Limit zooming in orbit mode
m_fCameraDistance += vMoveBy.z;
- if (m_fCameraDistance < 0.75 * fModelSize || m_fCameraDistance > 2 * fModelSize)
+ if ((m_fCameraDistance < 0.75 * fModelSize && vMoveBy.z < 0.0 ) ||
+ (m_fCameraDistance > 2 * fModelSize && vMoveBy.z > 0.0 ))
{
m_fCameraDistance -= vMoveBy.z;
vMoveBy = glm::vec3(0.0);
More information about the Libreoffice-commits
mailing list