Make the directory
~your_login_name/cs420/mesh1
copy the files from /pool/u/class/cs420/polygon/mesh1 to it.
Compile and execute mesh. ( Other object files should reside
in the directory "../mesh/" that you have used in Lab 9 and 10. )
You should see the effects of affine transformation as discussed in class.
Now make a simple animation of rotating the barn. Note that you should
not increment your rotating angle as the OpenGL matrix multiplication
has already effectively incremented the angle each time you call
the rotating function. Next, try the animation of translating and scaling
then
a combination of translating, rotating and scaling.
You may clear the screen with the command
glClear(GL_COLOR_BUFFER_BIT);
If you want the animation to appear more smoothly, you may use double buffering.
Simply use
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );
in your main.cpp and use
glutSwapBuffers();
to render your image in display().