X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=ad7e4bfb08c056ffff6c870f08be40f337f2905b;hp=a1ff085702f745f036240cac9d048859a5ed76dd;hb=5a9dfd8e5f68b2f6062987a5b67bbd7934828bf1;hpb=63e9aefdfc12daef518074efa3021b7b9a0f5d38 diff --git a/scene.c b/scene.c index a1ff085..ad7e4bf 100644 --- a/scene.c +++ b/scene.c @@ -302,9 +302,14 @@ 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; + printf("Scaling by %f on all axii\n", scaling); + sceneObjs[curObject].scale[0] += scaling; + sceneObjs[curObject].scale[1] += scaling; + sceneObjs[curObject].scale[2] += scaling; } startx = x;