(no commit message)
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index 78bfefd..55b1856 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -216,66 +216,6 @@ void mouse(int button, int state, int x, int y) {
   }\r
 }\r
 \r
-/**\r
- * Keybord event handler\r
- * w/s increase/decrease the z\r
- * a/d increase/decrease the x\r
- * q/e increase/decrease the y\r
- * z/x increase/decrease the angle\r
- * @param key Key pressed\r
- * @param x x co-ordinate of mouse\r
- * @param y y co-ordinate of mouse\r
- */\r
-void keyboard(unsigned char key, int x, int y) {\r
-  switch(key) {\r
-    case 'w':\r
-    case 'W':\r
-      camz -= factor;\r
-      break;\r
-    case 'a':\r
-    case 'A':\r
-      camx -= factor;\r
-      break;\r
-    case 's':\r
-    case 'S':\r
-      camz += factor;\r
-      break;\r
-    case 'd':\r
-    case 'D':\r
-      camx += factor;\r
-      break;\r
-    case 'q':\r
-    case 'Q':\r
-      camy += factor;\r
-      break;\r
-    case 'e':\r
-    case 'E':\r
-      camy -= factor;\r
-      break;\r
-    case 'z':\r
-    case 'Z':\r
-      keyrot += factor;\r
-      break;\r
-    case 'x':\r
-    case 'X':\r
-      keyrot -= factor;\r
-      break;\r
-    case '=':\r
-    case '+':\r
-      factor += 0.1;\r
-      printf("Factor of change is now %f\n", factor);\r
-      break;\r
-    case '-':\r
-    case '_':\r
-      factor -= 0.1;\r
-      printf("Factor of change is now %f\n", factor);\r
-      break;\r
-\r
-  }\r
-  printf("Camera is now at (%f, %f, %f), angle %f\n", camx, camy, camz, keyrot);\r
-  glutPostRedisplay();\r
-}\r
-\r
 /**\r
  * Called when motion event occurs\r
  * @param x Mouse x position\r
@@ -502,32 +442,19 @@ int main(int argc, char **argv) {
   glDepthRange(0,1);\r
   glEnable(GL_DEPTH_TEST); // Enables Depth Testing\r
   glDepthFunc(GL_LEQUAL);  // the type\r
-  glEnable(GL_CULL_FACE);\r
-  glLineWidth(2.0);\r
+  //glEnable(GL_CULL_FACE);\r
+  glLineWidth(1.0);\r
 \r
   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r
 \r
   glutReshapeFunc(windowReshape);\r
   glutDisplayFunc(display);\r
   glutMouseFunc(mouse);\r
-  glutKeyboardFunc(keyboard);\r
   glutMotionFunc(motion);\r
 \r
   makeMenu();\r
-\r
   initializeLights();\r
-\r
-  /* Initial light 0 position. */\r
-  lightObjs[0].position[0] = 4;\r
-  lightObjs[0].position[1] = 5;\r
-  lightObjs[0].position[2] = 6;\r
-  lightObjs[0].position[3] = 0.0;\r
-\r
-  /* Initial light 1 position. */\r
-  lightObjs[1].position[0] = -4;\r
-  lightObjs[1].position[1] = 5;\r
-  lightObjs[1].position[2] = -6;\r
-  lightObjs[1].position[3] = 0.0;\r
+  initializeState();\r
 \r
   glutMainLoop();\r
 }
\ No newline at end of file

UCC git Repository :: git.ucc.asn.au