$24
This is an individual assignment.
Objectives
Demonstrate an ability to apply knowledge of computing, mathematics, science, and engineering by learning and applying knowledge of C++ to solve a problem (1)
Demonstrate an ability to analyze a problem, and identify, formulate and use the appropriate computing and engineering requirements for obtaining its solution (5)
Demonstrate an ability to use the techniques, skills, and modern engineering tools necessary for engineering practice
Demonstrate an ability to apply design and development principles in the construction of software systems or computer systems of varying complexity
Assignment
Go through the rst four ogre tutorials (except 3) on the ogre website. Make sure that you can make the camera move around the world.
Non-oriented physics
First, make a large (10000 10000) planar textured surface located at the origin on the xz plane at a height speci ed by a surfaceHeight variable (15 points).
Load a sphere into ogre at the origin. Make the sphere move in 3D with a velocity de-termined by the numeric pad's arrow keys and PGUP/PGDOWN. Key presses increase or decrease the x, y, and z components of the sphere's velocity (60 points).
You will control the camera with the WASD keys for camera motion in the xz plane and
1
the E/F keys for camera motion along the y-axis (15 points). You should learn from (and re-purpose) the code for making the Ninja move in the tutorials.
Note carefully, that the contol keys (numeric pad's arrows, PGUP, PGDOWN keys) change the sphere's velocity not position. For example, if you hit the numeric uparrow key (numeric 8), just once, and let it go, your sphere should start moving forward in the xz plane and continue moving forward forever. Contrast this with the camera which stops moving as soon as you release the key.
Hitting the space bar should set the sphere's velocity to (0; 0; 0) and thus stop it from moving (10 points).
0.1 Extra Credit
Texture the sphere and make it look like the Earth or Mars or the Moon (+1)
Implement tab selection where the tab key selects the next entity modulo the number of entities. Create 100 spheres in a 10 rows and 10 columns, and apply user input, as in the assignment, to the currently selected entity indicated by a framebox around the entity(+5).
Use a ship model from http://www.cse.unr.edu/~sushil/models/ and ensure that the ship is oriented correctly as it moves (+10)
I am open to other ideas, so talk to me (+x)
Turning in your assignment
Assume that this format will be used for all your laboratory assignments throughout the semester unless otherwise speci ed.
Demonstrate your working program in the lab on the due date. Demonstrate each of the above features. You will be graded on your in-class demonstration.
In lab, before demoing your program to the grader/TA, upload your code to Canvas. You will zip or, tar and gzip, the folder with all your code into one le. Upload this one le on Canvas.
Ask me (sushil@cse.unr.edu) if you have questions.
2