From 5e6a932345dfe95c3d2b289053b93abfb5c5d4fb Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sat, 22 Oct 2011 09:11:45 +0800 Subject: [PATCH] --- scene.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scene.c b/scene.c index a1ff085..6d47393 100644 --- a/scene.c +++ b/scene.c @@ -302,9 +302,13 @@ void motion(int x, int y) { //so.x, so.y, so.z if ( buttonSelected == GLUT_LEFT_BUTTON ) { // w: left/right, h: near/far - sceneObjs[curObject].x += (x - startx); + //sceneObjs[curObject].x += (x - startx)*leftrightFactor; } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) { // w: big/small, h: up/down + float scaling = (y - starty)*bigsmallFactor; + sceneObjs[curObject].scale[0] += scaling; + sceneObjs[curObject].scale[1] += scaling; + sceneObjs[curObject].scale[2] += scaling; } startx = x; -- 2.20.1