X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=34b7462dd44e86a1293acbd6d513f6b09afe4c67;hb=892a5bee9691e9566a5cf6b996f55c0b6ab14747;hp=d9a4ea3be32f39ed4ab99b5a8cb52c6971cabe3c;hpb=ddf25313dfc93155b958b2838b6dba330e2706d9;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index d9a4ea3..34b7462 100644 --- a/scene.c +++ b/scene.c @@ -298,13 +298,18 @@ void display() { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); + GLfloat zcoord = 5.0 + (zoomFactor*0.2); + if ( zcoord < 0.0 ) { + zcoord = 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 */ ); - glRotatef(75.0, 1.0, 0.0, 0.0); + glRotatef(50.0, 1.0, 0.0, 0.0); /* Reposition the light source. */ lightPosition[0] = 12*cos(lightAngle);