Faculty of Informatics, Masaryk University PA199 Assignment One Advanced Game Design Deadline: 24th March 2015 PA199 Assignment 1. Page 1 1st Assignment Implement a set of computer graphics libraries in C++ Your assignment represents 30% of the module mark. Task The aim of the assignment is to implement from scratch a set of computer graphics classes that will be used for creating the physics components of different interactive computer games. Specification Based on the vector theory you should implement a 3D vector class in C++ which will be used as a basis for the rest of the course. Based on the matrices theory you should implement a 3×3 matrix class in C++ which will be used as a basis for the rest of the course. Based on the ray theory you should implement a ray class in C++. Minimum Implementation The basic implementation should include the following:  A 3D vector class, which you can call TVector, with three components (x, y and z). Define the 3 components as doubles.  A 3×3 matrix class, which you can call Tmatrix, with a two-dimensional array (i.e. double _Mx[3][3]).  A Ray class which will be based on the vector and/or matrix class. The following functions should be included:  Unit vector (for vector class)  Magnitude of a vector (for vector class)  Invert a vector (for vector class)  Add two vectors (for vector class)  Subtract two vectors (for vector class)  Dot product vector (for vector class)  Cross product vector (for vector class)  Addition (for matrix class)  Subtraction (for matrix class)  Multiplication (for matrix class)  Transpose (for matrix class)  Inverse (for matrix class)  Calculate distance between two rays (for ray class)  Calculate distance between a ray and a point (for ray class) Note that you will need to use mathex.h C++ library for mathematical operations. PA199 Assignment 1. Page 2 Extra Features Extra credit will be given for adding more features to the classes. Some examples might include:  Implement a place class  Implement a camera class  Implement advanced rotations