🔒 Locked
moving vertices
Advertisement
Original Post
I'm very beginner in game programming and programming itself.
I want to move my vertices from one position to another... is there special functions in DX or i have to creat my own. If DX8 has a function for that then can somebody show me some code example or progam.
Best wishes to all programmers!!!
Edited by - furby100 on December 24, 2001 10:47:45 AM
You can''t.
If you want to rotate Objects without changing the matrix, you have to move every vertex itself.
This takes a lot of math and work.
You can rotate everything with changing the matrix.
For Objects, which don''t have to move, you can set an Identity Matrix.
That''s all, and it''s all really simple so why don''t using matrices?
Sebo
If you want to rotate Objects without changing the matrix, you have to move every vertex itself.
This takes a lot of math and work.
You can rotate everything with changing the matrix.
For Objects, which don''t have to move, you can set an Identity Matrix.
That''s all, and it''s all really simple so why don''t using matrices?
Sebo
not sure if I understand what you''re after ligalize, with saying that you don''t want to move the world matrix do you mean that you don''t want to translate everything but a single object? If that''s the case then you can use multiple matrices for different objects. Otherwise it''s exactly as Sebo said alot of math and work when matrices are so easy.
// Shadows
// Shadows
G''day!
The World Matrix is used to transform a mesh from Model Space to World Space. You use it to rotate, scale, translate (move) your vertices. Each object can have it''s own World Matrix, you don''t set one per scene.
If you go to:
http://www.drunkenhyena.com/docs/d3d_tutorial.phtml
You''ll find some tutorials to walk you through the beginning stages of D3D8.
Stay Casual,
Ken
Drunken Hyena
The World Matrix is used to transform a mesh from Model Space to World Space. You use it to rotate, scale, translate (move) your vertices. Each object can have it''s own World Matrix, you don''t set one per scene.
If you go to:
http://www.drunkenhyena.com/docs/d3d_tutorial.phtml
You''ll find some tutorials to walk you through the beginning stages of D3D8.
Stay Casual,
Ken
Drunke
quote:
Original post by Sebo
I don''t think this is 100 % correct
right, every Object can have its own matrix.
But there is only ONE World Matrix, you give the othe matrices to the worldmatrix
Well, this is how I think
G''day!
Same thing, just a different way of looking at it. Each object has it''s own Model to World transformation matrix, D3D is a state machine, so you set which one is currently active.
In my view there can be an infinite number of World matrices, but only one is active at any given time.
Stay Casual,
Ken
Drunke
I use stacks of matrices to keep track of all of the different world matrices I''m using. When I want a new one, I just push the current one down, transform the object I''m currently drawing, and pop the old one back up when I''m done.
-----
Riley Lark
"Drinking more Dr. Pepper before 9 AM than most people drink by 9:30."
-----
Riley Lark
"Drinking more Dr. Pepper before 9 AM than most people drink by 9:30."
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement