University of Calgary, CPSC453
Assignment 3
3D Mesh viewer

Release Date: Monday, Nov 1, 2010
Due date: Sunday, November 21, 2010 @ 11:59 pm
Total Marks: 100 marks + 25 bonus
Weight of this assignment: 25%

General Specification of the Assignment

In this assignment you will write a MD2 object file viewer. The viewer reads an md2 file and renders it in a suitable view port on the display. It allows the user to perform affine transformations on the mesh. It provides the user with the option of changing the view specification and the type of the projection. It also allows the user to control different animation behaviors (optional as bonus). The program must have user-friendly interaction using mouse, keyboard, and menu.

Take a look at this a MD2 viewer implementation showing the basic goal for this assignment.

Note that all marks listed below require the desired functionality to be implemented as well as an appropriate user interface that demonstrates the functionality.

FUNCTIONAL REQUIREMENTS (92 marks)

First, download the basic MD2 file loaders:

Write the program structure and interface to allow the user to load MD2 models with the following functionalities:

Rendering (52 marks)

Affine Transformations (18 marks)

View Changes (17 marks)

File open (5 marks)

NON-FUNCTIONAL REQUIREMENTS (10 marks)

Documentation (4 marks)

1. You must provide a README file (Preferably in Adobe PDF format).

2. Your README file should contain:

(a) Your name and login id
(b) Directions on compiling and running your program
(c) A brief description of the data-structures and algorithms you used to implement the assignment
(d) A simple user-manual for your program.

Source Code (4 marks)

1. All your source code must be written in C/C++ and properly commented. All graphics rendering must be done using OpenGL. All event handling and windowing must be performed via GLUT or QT. Your source code must compile on the lab machines in MS 239 without any special modifications. Your source code must be clear and well commented.

2. You will lose marks for inefficient and slow implementations.

3. You may reuse source code:

(a) that has been provided by the instructor for use in the course,
(b) that has been previously written by you which implements basic data structures, such as linked lists or arrays,
(c) that you have received permission from the instructor or one of the TAs of CPSC 453 prior to handing-in your assignment.

4. Any instances of code reuse by you (including the above) for this assignment must be explicitly mentioned within the README.pdf file. Failure to do so will result in a zero in the assignment. Please read the University of Calgary's regulations regarding plagiarism [http://www.ucalgary.ca/honesty/plagiarism].

BONUS (at most 25 marks)

    // animation list
    typedef enum {
        STAND,
        RUN,
        ATTACK,
        PAIN_A,
        PAIN_B,
        PAIN_C,
        JUMP,
        FLIP,
        SALUTE,
        FALLBACK,
        WAVE,
        POINT,
        CROUCH_STAND,
        CROUCH_WALK,
        CROUCH_ATTACK,
        CROUCH_PAIN,
        CROUCH_DEATH,
        DEATH_FALLBACK,
        DEATH_FALLFORWARD,
        DEATH_FALLBACKSLOW,
        BOOM,
        MAX_ANIMATIONS    } animType_t;

·         Multiple viewports:  Support multiple viewports (for example, side, top and perspective). (5 marks)
·         Alternative projection or rendering: Construct an alternative, attractive projection and/or rendering style 1 mark for easy, 5 marks for "amazing”!

 

Presentation

You are required to give an approximately 5 minute live demo to your TA, a schedule will be posted and you can sign up for a time slot. It is your responsibility to arrange for a presentation with your TA. Failure to show up at the presentation will result in a zero in the assignment.