Windmill: Glutkeyboardfunc (Void (Func) (Unsigned Char Key, Int X, Int Y) )
Windmill: Glutkeyboardfunc (Void (Func) (Unsigned Char Key, Int X, Int Y) )
WindMill
(a) Draw 2D Windmill shape that can rotate in the screen plane by a certain positive or
negative angle in case the keys L or R are pressed, respectively. To do this, register a
keyboard callback with glutKeyboardFunc(void *(func)(unsigned char key, int x, int y))
(b) Tell the user by writing on the terminal (stdout, stderr) or into your graphics window
which key has to be pressed and what the effect is
(c) Answer the question: What is the meaning and the value of the variables x and y.
(d) If the key Q is pressed your program terminates.