PDA

View Full Version : Matrices



Y0
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

TheLion
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...

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

Thanks so much.

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