   DirectX Custom Class - Nothing Renders
  I am learning to program in DirectX 9 for starting out, I am creating custom classes and everything was going well until I hit Direct X Matrix's. I'm not sure what the Matrix's are for in the first place - just that they keep detailed calculation of transformations. I know you merge them by multiplying them but multiplying anything by zero equals zero and I don't know what to initialize the matrix to.I have tried initializing the entire matrix to zero and it renders nothing, when I try one it still renders nothing. When I don't initialize everything is all badly distorted but does render at least something.I am trying to make a class that hold's the world transform as one single matrix. I can use rotation functions, transformation, etc... and it updates that one matrix. In the end I can apply all the transformations at one time from that one matrix to the DirectX device.The problem is coming from this class although I'm not sure where, up to this point all of my other classes have worked wonderfully. Debugging reveals the central matrix always has the value of zero, so when I initialize with one's it still renders nothing after trying a rotation - the problem must be coming from multiple places.Can anyone explain what to initialize the matrix to and how something like this might generally be setup.   
  Have you read through the direct x docshttp://msdn.microsoft.com/en-us/library/bb147302(VS.85).aspx(reading a tutorial on linear algebra might be useful too).   ;  It'll be difficult to understand without understanding matrices - I'd recommend reading up on them on various maths sites (They're not DirectX or even 3D graphics specific).Generally, a "default initialised" matrix is the identity matrix (See D3DXMatrixIdentity()), and if you have two matrices A and B, then A*B gives you a matrix that is equivalent to applying the transform of A and then the transform of B. Also, A*B is not the same as B*A.Assume that A is a matrix that translates an object by (0, 0, 10), and B is a matrix that rotates by 90 degrees clockwise about the Y axis. Then A*B will give you a matrix that is equivalent to translating an object by 10 units in Z, and then rotating 90 degrees about Y. So, transforming the point (1, 0, 0) by that will give you (10, 0, -1), whereas B*A would give you a matrix equivalent to doing the rotation first and then the translation; an output of (0, 0, 11).   ;  As Ron AF Greve, reading up on linear algebra will help.Meanwhile though, the value that you probably want to initialize your matrices to is 'identity' (there should be a DX function that will do this for you).'Identity' for a matrix is a matrix of zeros with ones in the diagonal (top-left to bottom-right). This is the multiplicative identity for matrices (analogous to '1' for real numbers). If you work through the matrix multiplication I*M or M*I by hand (where I is identity and M is an arbitrary matrix), you should see that the result is simply M.   ;  It's working great now, I used the identity matrix to initialize the temporary matrix and master matrix and multiplied them together on merge. I was blown away at the math level required for professional video game design.   