X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=128e6218e42569c941daca84d989e5b69c7c75c5;hp=c37c4a3d2719c23fba4f27326aac67a8c8393225;hb=fa93bc8620c7fb9742327cf0b41dfe0ae970a324;hpb=eb6ba5c01c4256e8212dfc5d9b6630dcdb258dc2 diff --git a/scene.c b/scene.c index c37c4a3..128e621 100644 --- a/scene.c +++ b/scene.c @@ -613,11 +613,13 @@ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt( - 0.0, 0.0, 30.0, /* eye is at (x,y,z) */ + 0.0, 0.0, 80.0, /* 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(30.0, 1.0, 0.0, 0.0); + /* Reposition the light source. */ lightPosition[0] = 12*cos(lightAngle); lightPosition[1] = lightHeight; @@ -626,7 +628,7 @@ void display() { glPushMatrix(); /* Perform scene rotations based on user mouse input. */ - //glRotatef(angle2, 1.0, 0.0, 0.0); + glRotatef(angle, 0.0, 1.0, 0.0); glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); @@ -648,7 +650,7 @@ void display() { /* Draw a yellow ball at the light source. */ glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); - glutSolidSphere(1.0, 5, 5); + glutSolidSphere(100.0, 5, 5); glEnable(GL_LIGHTING); glPopMatrix();