CSCI 441 - Computer GraphicsFall 2016 |
|
| Home | Syllabus | Assignments | Leaderboard | Schedule | Resources | | |
JamtapeThis is the Mines logo! Lab00a Lab00b My banner (HW1) My Hero (A2) My Game My Vehicle.I may have gone extremely overboard with this assignment. I've essentially created an object oriented version of the entire assignment. Everything is abstracted out into classes such that main.cpp is only handling the initial openGL setup, the high-level drawing calls, and user input. All of the objects that are getting drawn are classes of the abstract type "object". This allows me to create a collection of objects, iterate over that collection and call the virtual method draw. One object of interest is my "camera" object. I can do a ton of really cool things with this construct. When initializing the camera, you need to pass in a "focus", an "anchor", and a camera type, which is defined as an enumerated type in "camera". the "focus" and "anchor" objects are both of the abstract class "object". What this allows me to do is to be able to pass in my "vehicle" (inheriting from "object") by reference and have my camera's focal point follow the vehicle at all times. In the same way, if my vehicle becomes the anchor for the camera, the camera's position will always be tethered to the vehicle. There's a ton of potential with this system to do a lot of really cool things, but unfortunately, I ran out of time to implement it. I'll definitely be using this code base in future assignments, labs and projects. A4 This program demonstrates my custom textured particle system. A6 Survival minigame! A7 Ugly Pacman! FP | |