+/**\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
+ camz = camz - 1;\r
+ break;\r
+ case 'a':\r
+ camx = camx - 1;\r
+ break;\r
+ case 's':\r
+ camz = camz + 1;\r
+ break;\r
+ case 'd':\r
+ camx = camx + 1;\r
+ break;\r
+ case 'q':\r
+ camy = camy + 1;\r
+ break;\r
+ case 'e':\r
+ camy = camy - 1;\r
+ break;\r
+ case 'z':\r
+ rot = rot + 1;\r
+ break;\r
+ case 'x':\r
+ rot = rot - 1;\r
+ break;\r
+ }\r
+ printf("Camera is now at (%f, %f, %f), angle %f\n", camx, camy, camz, rot);\r
+ glutPostRedisplay();\r
+}\r
+\r