View Full Version : Matrices

19-11-2002, 11:51 PM
Hi all

I am a newbie here.
Would any body like to give me a simple code to rotate two triangle. The first triangle rotate in Y axis and the second one rotate in X axis.
I have run the Tut03_Matrices from JEDI DirectX Examples but it seems not to rotate the triangle but the world (device).

Thanks in Advanced

20-11-2002, 06:57 AM
I could be wrong, since I'm not that much into 3D programming and all I did was OpenGL, but don't you rotate the world and then draw the scene with the new viewpoint so the triangle appears to be rotating...

So if this is true then you would do something like this (pseudo):
1. RotateWorld X
2. DrawTriangle 1
3. RotateWorld Y
4. DrawTriangle 2

Hope this helps a bit...

20-11-2002, 10:21 AM
Yes, I did it I solved that. :D

Thanks so much.

20-11-2002, 10:27 AM
I'm glad it worked! ;)