- /* Reposition the light source. */\r
- lightPosition[0] = 12*cos(lightAngle);\r
- lightPosition[1] = lightHeight;\r
- lightPosition[2] = 12*sin(lightAngle);\r
- lightPosition[3] = 0.0;\r
+ gluLookAt(\r
+ 0.0, 0.0, 15.0 + (zoom*zoomFactor), /* eye is at (x,y,z) */\r
+ 0.0, 0.0, 0.0, /* center is at (x,y,z) */\r
+ 0.0, 10.0, 0.0 /* up is in postivie Y direction */\r
+ );\r
+\r
+ glRotatef(camAngle*camAngleFactor, 1.0, 0.0, 0.0);\r
+\r
+ /* Reposition the light source 0. */\r
+ lightPosition0[0] = 12*cos(lightAngle0);\r
+ lightPosition0[1] = lightHeight0;\r
+ lightPosition0[2] = 12*sin(lightAngle0);\r
+ lightPosition0[3] = 0.0;\r
+\r
+ direction0[0] = lightPosition0[0];\r
+ direction0[2] = lightPosition0[2];\r
+\r
+ /* Reposition the light source 1. */\r
+ lightPosition1[0] = 12*cos(lightAngle1);\r
+ lightPosition1[1] = lightHeight1;\r
+ lightPosition1[2] = 12*sin(lightAngle1);\r
+ lightPosition1[3] = 0.0;\r
+\r
+ direction1[0] = lightPosition1[0];\r
+ direction1[2] = lightPosition1[2];\r