| 1 | = Final Project - Winter = |
| 2 | |
| 3 | [[Image(thumbnail.png,right)]] |
| 4 | |
| 5 | Completed 12/11/2003. |
| 6 | |
| 7 | == Project Overview == |
| 8 | This program is an interactive outdoor winter scene. |
| 9 | |
| 10 | == Interaction == |
| 11 | There are two main modes of interaction -- on foot and on a sled. |
| 12 | |
| 13 | To detect mouse motion, the cursor is locked inside the window. To |
| 14 | free the cursor, press the escape key. To regain focus, click inside |
| 15 | the window. |
| 16 | |
| 17 | * Common Controls |
| 18 | * Keyboard |
| 19 | * a/s/d/w = Move left/back/right/forward. |
| 20 | * q/e = Turn left/right. |
| 21 | * o = Get into or out of the sled. |
| 22 | * x = Exit. |
| 23 | * escape = Free the cursor. |
| 24 | * Mouse |
| 25 | * Left click = Throw a snowball, or just regain focus if the cursor |
| 26 | was freed. |
| 27 | * Middle click Get into or out of the sled. |
| 28 | * On Foot |
| 29 | * Mouse |
| 30 | * Motion = Look around or turn. |
| 31 | * Right click = Jump. |
| 32 | * On Sled |
| 33 | * Mouse |
| 34 | * Right button (hold it) = Let go and let gravity move the sled. |
| 35 | * Keyboard |
| 36 | * Space (hold it) = Let go and let gravity move the sled. |
| 37 | |
| 38 | == Files (.h files pertain to relevant .cpp or .hpp files) == |
| 39 | * README - This |
| 40 | * winter - The Linux binary |
| 41 | * winter.exe - The Windows binary |
| 42 | * Makefile - 'make' to build in Linux |
| 43 | * Makefile.cygwin - 'make -f Makefile.cygwin' to build in Cygwin |
| 44 | * cabin.cpp - Displays a log cabin, complete with a fireplace and smoke |
| 45 | * cabin.h |
| 46 | * clock.cpp - Used to maintain constant motion despite frame rate |
| 47 | * clock.h |
| 48 | * data - Contains images |
| 49 | * brick.raw - from http://www.vb3d.com/Textures.html |
| 50 | * cedar.psd |
| 51 | * cedar.raw |
| 52 | * firewood.psd |
| 53 | * firewood.raw |
| 54 | * flame1.psd |
| 55 | * flame1.raw |
| 56 | * flame2.psd |
| 57 | * flame2.raw |
| 58 | * flame3.psd |
| 59 | * flame3.raw |
| 60 | * flame4.psd |
| 61 | * flame4.raw |
| 62 | * snow.psd |
| 63 | * snow.raw |
| 64 | * snowflake.psd |
| 65 | * snowflake.raw |
| 66 | * stone.psd |
| 67 | * stone.raw |
| 68 | * toboggan.psd |
| 69 | * toboggan.raw |
| 70 | * trees.raw - from http://www.vb3d.com/Textures.html |
| 71 | * main.cpp - User interface, displace, etc. |
| 72 | * makesled.pl - Used to generate part of sled.cpp |
| 73 | * matrix.h |
| 74 | * matrix.hpp - An NxN matrix class |
| 75 | * movingobject.cpp - An object with a velocity |
| 76 | * movingobject.h |
| 77 | * object.cpp - A position and rotation |
| 78 | * object.h |
| 79 | * random.cpp - Generate random numbers |
| 80 | * random.h |
| 81 | * sled.cpp - Draws a toboggan |
| 82 | * sled.h |
| 83 | * snowfall.cpp - Draws textured triangles falling from the sky |
| 84 | * snowfall.h |
| 85 | * terrain.cpp - Draws a heightmapped terrain |
| 86 | * terrain.h |
| 87 | * texture.cpp - Loads a 256x256 raw image into a GL texture |
| 88 | * texture.h |
| 89 | * treeline.cpp - Draws a treeline around the terrain |
| 90 | * treeline.h |
| 91 | * trees.cpp - Draw pine and maple trees |
| 92 | * trees.h |
| 93 | * vertex.cpp - Some linear algebra helpers |
| 94 | * vertex.h |
| 95 | |
| 96 | == Compilation Instructions == |
| 97 | Compiled in Linux with: |
| 98 | * gcc-3.3.2 |
| 99 | * glut-3.7.1 |
| 100 | |
| 101 | Compiled in Windows with: |
| 102 | * Cygwin |
| 103 | * gcc-3.3.1 |
| 104 | * glut-3.7 |
| 105 | * $ make -f Makefile.cygwin |