ganeswidgets/src/hgtransformedquad.cpp
changeset 20 a60f8b6b1d32
parent 5 4fa04caf0f43
--- a/ganeswidgets/src/hgtransformedquad.cpp	Fri Sep 17 15:55:58 2010 +0300
+++ b/ganeswidgets/src/hgtransformedquad.cpp	Wed Oct 06 14:53:41 2010 +0300
@@ -106,16 +106,17 @@
 
         QMatrix4x4 mirror = trans;
 
+        QVector2D temp = quad->scale();
         qreal distToPlane = qAbs(quad->position().y() - mirroringPlaneY);
         
-        mirror.translate(quad->position().x(), mirroringPlaneY - distToPlane/1, quad->position().z());
-        mirror.scale(quad->scale().x(), -quad->scale().y()/1);
+        mirror.translate(quad->position().x(), mirroringPlaneY - distToPlane, quad->position().z());
+        mirror.scale(quad->scale().x(), -temp.y()*ReflectionHeight);
         mirror.rotate(quad->rotation());
             
         QMatrix4x4 modelViewProjMatrix = projView * mirror;
         
         perspectiveTransformPoints(mMirroredPoints, modelViewProjMatrix, center, windowSize);    
-        
+                
         for (int i = 0; i < 4; i++)
             mMirroredPoints[i] += translate;