Introduction to 3D
Phew!! This was a challenging assignment for me. I understood all the concepts. But the biggest challenge was to convert those concepts into code. I referred and got some help figuring out the code part from Jason Thummel's Code.
For Moving the Camera:
I created a cCamera Class. cCamera Class create the World To View Transformation Matrix.
Controls for moving the camera:
W - Up
S - Down
A - Left
D - Right
Controls for moving the Cube
Up Arrow - Up
Down Arrow - Down
Left Arrow - Left
Right Arrow - Right
For the World To View Transformation, I used the LookAt function.
cMesh Class created the Model To View Transformation Matrix
I had problems figuring out how to create the View To Projection Transformation Matrix.
Following links helped me understand it.
Phew!! This was a challenging assignment for me. I understood all the concepts. But the biggest challenge was to convert those concepts into code. I referred and got some help figuring out the code part from Jason Thummel's Code.
For Moving the Camera:
I created a cCamera Class. cCamera Class create the World To View Transformation Matrix.
Controls for moving the camera:
W - Up
S - Down
A - Left
D - Right
Controls for moving the Cube
Up Arrow - Up
Down Arrow - Down
Left Arrow - Left
Right Arrow - Right
For the World To View Transformation, I used the LookAt function.
cMesh Class created the Model To View Transformation Matrix
I had problems figuring out how to create the View To Projection Transformation Matrix.
Following links helped me understand it.
Here's the link for my code:Download Code
No comments:
Post a Comment