matrix

Started by
2 comments, last by XVincentX 15 years, 3 months ago
hy. I'm still studing the directx , but i'm not understand the use of matrix for the transform. In particular the view matrix the world matrix and the projection matrix. With the settransform i multiply the matrix for another matrix or i simply "set" the special(view , world or projection)matrix? And : After a transformation i must reset the world matrix(in opengl glidentity())? How?
Advertisement
Quote:Original post by giugio
hy.
I'm still studing the directx , but i'm not understand the use of matrix for the transform.
In particular the view matrix the world matrix and the projection matrix.
With the settransform i multiply the matrix for another matrix or i simply "set" the special(view , world or projection)matrix?

And :
After a transformation i must reset the world matrix(in opengl glidentity())?
How?
SetTransform() just sets the transform, it doesn't multiply it by the current matrix. If you want that, look into ID3DXMatrixStack.

And you only need to set an identity matrix if you want the next thing to draw with an identity matrix. If the next thing is going to call SetTransform() anyway, then there's no need to set an identity matrix.
Hi giugio.

Explaining the intricacies of matrices will take some time I'm afraid and will be quite difficult to do concisely in one post, given that I'm not sure what level of Maths you're comfortable with.

However, I've suggested a good book out there that will probably explain this subject matter to you a lot more clearly. Matrices, matrix transformations and their use within DirectX can be quite involved and I doubt anyone here will be able to run you through all the technicalities in a way that you'll understand.

On the subject of matrix mathematics, there are literally thousands upon thousands of books out there. Any maths book that includes matrices will do and many of them have exercises so that you can practise the maths on your own.

However, if that's not the problem and you really just want to see how matrices fit within the framework of DirectX in particular, then one book that I've found VERY useful is:

Introduction to 3D Game Programming with DirectX 9.0 - By Frank D Luna

There's a new edition out that also explains advanced topics, like shaders, so once you've grasped the basics this book should still prove useful.

Sorry if this isn't much help, but sometimes the best way to learn is to research it yourself first, then ask specific questions on specific points if more clarity is needed.

And remember, books are just one way to learn. The Internet has lots of good material, as does GameDev. I'm sure someone may link you a good GameDev link shortly. I don't know that many myself 'cos I'm a bit of an old fashioned book worm ^^
Usually it's better to start with DirectX only after some months dedicated only to mathematics.
Anyway, you can find a very good documentation about matrices in the DirectX SDK documentation for C++.

Oppure chiedi a me su msn.

This topic is closed to new replies.

Advertisement