XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone



Hi Chad,

I have just finished CHapter 5, and i wanted to cement my knowledge alittle on how im creating various matrices that you have shown. Take for example this bit of code:







Matrix.CreateRotationY(MathHelper.ToRadians(_cameraYaw), out rotationMatrix);


I have debugged the code to see the results. How does the helper function just take in degrees and populate all of the M11, M12, M13 etc etc float members (Which im presuming make up 4x4 matrix explained earlier).


I found alot of these members held data. How does this data reflect a rotation? Do these Matrix Helper functions use any specific mathes behind them? I was doing to download the XNATouch Mono project and take alook behind the scenes as i know they expose the code. But before doing this i thought io would ask. It would help if M$ made better MSDN help files to explain this aittle better! :)


I dont want to move any further in the book until im completely happy with 3D matrices and how they operate (thus all the questions).


Thanks as always CHad, appreciated.

garfbradaz - Wednesday, September 1, 2010 @ 3:43 PM

Re: Matrices

ALso Chad is the following a good explanation of what the terminology of each matrix means:



For e.g. i was confusing myself at the end of Chapter 6 when we created matrices using the terminology  world to spin the Asteroids!

garfbradaz - Thursday, September 2, 2010 @ 3:38 PM

Re: Matrices

Regarding matices check out this wikipedia entry


Yes, that appears to be a good article from what I scanned. More information on the different spaces is in this article:


The good thing about the XNA Framework is that it abstracts some of these things away so you don't have to focus on them too much.  The key is linear algebra.  If you spend time learning linear algebra you will have all of the concepts down and can understand what the framework is doing. 

I'll be out for the week so I may not see any responses.  Good luck on your continued journey!

Chad Carter - Monday, September 6, 2010 @ 12:29 AM

Re: Matrices

Thanks Chad :)

garfbradaz - Monday, September 6, 2010 @ 11:52 AM