X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=2f45633317dc6526b725347353fe82d3aedc8e50;hb=65f3d838461588453f40f54c884a48bc0a44e8fc;hp=7d45bbf2ded8b4489368d71c78c37b108331a206;hpb=65949d92003e506ddbcc3285abfc9d4b5070df13;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 7d45bbf..2f45633 100644 --- a/scene.c +++ b/scene.c @@ -298,8 +298,14 @@ void display() { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); + GLfloat zcoord = 5.0 + (zoomFactor*0.2); + if ( zcoord < 0.0 ) { + zcoord = 0.0; + zoomFactor = 0.0; + } + gluLookAt( - 0.0, 0.0, 5.0 + (zoomFactor*0.2), /* eye is at (x,y,z) */ + 0.0, 0.0, zcoord, /* eye is at (x,y,z) */ 0.0, 0.0, 0.0, /* center is at (x,y,z) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ );