|
-
Jul 5th, 2001, 05:05 PM
#1
Thread Starter
Good Ol' Platypus
Matrices? Huh?
How do I use the world matrix to rotate objects...? Or am I looking at the wrong thing? If so, what should I use to create the objects?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jul 5th, 2001, 06:07 PM
#2
Multiply tranlation, scaling, and rotation matrices, to get them to rotate, as well as move or scale.
Z.
-
Jul 5th, 2001, 08:26 PM
#3
Thread Starter
Good Ol' Platypus
But HOW do I get these matrices from the Vertices?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jul 6th, 2001, 04:47 AM
#4
Addicted Member
a Vertex maxtrix is simply (x,y,z) you multiply it by a rotation maxtrix (don't ask me the values, once upon a time i knew but not now) and the answer is a new (x,y,z)
isn't there something built into direct x to do this for you? Multiplying maxtrixs in code gives me a headache, i made my library to handle it ages ago and haven't touched it since
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Jul 6th, 2001, 11:08 PM
#5
Actually, you cant do <x, y, z> * 4x4 matrix(A 3D transformation). Vertices have to be in the form <x, y, z, w>. The w value is a scaler value, and is usually 1. If you are using DirectX, the World Matrix will be applied to any vertices passing through the transformation pipeline. So, if you wanted to rotate a model,you would set the world matrix to a rotation matrix you had created, then draw the model. If you then wanted to draw another model at a different rotation, just change the world matrix, and draw the second model and both models will draw correctly.
Z.
-
Jul 7th, 2001, 09:57 AM
#6
Thread Starter
Good Ol' Platypus
That makes sense, just like changing textures and materials and such... Thanks both of you.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|