SENECA COLLEGE OF APPLIED ARTS AND TECHNOLOGY

SCHOOL OF COMPUTER STUDIES

FINAL EXAMINATION

SEMESTERSUBJECTCODE

FALL 2006 __ 3D GAME PROGRAMMING DPS901

NAME ______

STUDENT NUMBER: ______

SECTION: A

DATE:December 14 2006

TIME ALLOWED:2 HOURS

QUESTIONS

1 Direct Input10 MARKS

2Occlusion Culling10 MARKS

3 Direct Audio 10 MARKS

4Vertices10 MARKS

5Transformations10 MARKS

TOTAL MARKS50 MARKS

PROFESSOR: Chris M. Szalwinski

SPECIAL INSTRUCTIONS:

  1. OPEN BOOK AND OPEN NOTES
  2. ANSWER ALL QUESTIONS IN THE EXAM BOOKLET PROVIDED
  3. HAND IN THIS EXAM PAPER WITH YOUR EXAM BOOKLET
  4. YOU MAY USE A NON-PROGRAMMABLE, NON-MESSAGING CALCULATOR

SENECA COLLEGE ACADEMIC POLICY:

CHEATING is an offence, which will not be tolerated by the College. Such offences occur when a student violates the procedures governing the administration of examinations, tests or other means of evaluating student achievement in a subject or program.

APPROVED BY:______

EVAN WEAVER, CHAIR

Question 1 – Direct Input (10 Marks)

Describe the steps involved in setting up a Joystick as a Direct Input device. Include in your description each step required before data can be retrieved from the device. List as example code the function calls used in the d3d8 sample and describe the arguments in those calls.

Question 2 – Occlusion Culling (10 Marks)

Occlusion culling is the removal of a surface that is hidden from the viewpoint by another surface. Compare two common methods of occlusion culling used in three-dimensional computer graphics (for example, the painter's algorithm and z-buffering). Identify the z-buffering function calls used in the d3d8 sample and describe the arguments in those calls.

Question 3 – Direct Audio (10 Marks)

Describe the steps involved in setting up continuous playback of a .wav file, where the frequency is adjusted by the application. Identify the function calls used in the d3d8 sample and describe the purpose of each call.

Question 4 – Vertices (10 Marks)

Describe the Direct3D format of a vertex of a graphics primitive that includes a texture and lighting. Include in your description:

–definitions of each component of the vertex structure

–descriptions of the purpose of each set of components

–the Flexible Vertex Format that informs Direct3D of the format of the vertex structure

Question 5 – Transformations (10 Marks)

Define the Direct3D world transformation matrices for

–a rotation of 180 degrees about the z world axis

–a scaling by a factor of 2 about the origin of world space

–a translation upwards by 3 units parallel to the y-axis of world space

–the combination (concatenation) of the above three transformations

Given a vector from the origin of world space to point [1, 1, 1], determine the coordinates of the transformed vector using the combination matrix. Sketch the vector in its initial and transformed states to check your calculations.