By Kyle McCartney
CSC 471 Final Project Spring 2013Description
Figuring out how to have the user place objects in a 3D world using 2D mouse coordinates proved to be the most challenging part. However, the solution was actually very simple. All I did was create a vector using the eye position and the look at point, which I normalized and scaled appropriately. This allowed me to have the object always be in the center of the screen and it allowed the user to position it using the WASD keys and pitch and yaw.
The other problem I had to figure out was how to keep objects in their place after the user placed the . For this I made an object structure that had data on every object such as its type, position, and size, and after each object was placed it was added to a vector of other placed objects, which I coulld render in a for loop in my Draw() function.
This project gave me a chance to use all of the knowledge I have learned in this course and apply it in a way that increased my understanding of it conceptually and practically. It also gave me a program that I can show off to people and continue to build on as I learn more abouts computer graphics and C++.