Assignment 2 FAQ and Student Discussion Page
The course staff will post answers to frequently asked questions about assignment 2 here. Feel free to add to this page yourself if you've got information to share with the rest of the class. Remember, the quickest way to get a response from a TA is to post to firstname.lastname@example.org
Question 1: Does my second hand need to be visible above the blue gear?
Yes, please make the second and minute hands visible during all points in their roation.
Question 2: What are the units of rotation in the STTransform class?
Just like OpenGL, the units of a rotation are degrees.
Notes on keeping your clock ticking at the correct rate
Although we probably won't put a lot of emphasis on this when grading assignment 2, you should think about the following to correctly get your clock to tick at an accurate rate:
You cannot assume that 1000/framesPerSecond millis occurs between the start of each timer event. This is just a rough estimate from the number of timer events you'll get in a second. Setting a timer event tells glut to not call your event handler until at least this amount of time has passed, there aren't any guarantees about the exactness of the actual delay. Additionally, there is also time that elapses while executing your code before the next timer event is scheduled. All these factors means that basing your clock's rotation based on timer events is fairly inaccurate.
What you want to do is base rotation on elapsed wall clock time since the start of your application. The STTimer class provides you the means to check how many millis have elapsed since a designated start point. This is a reliable way to determine how much you should rotate the gears between frames.