Jump to content
  • Advertisement
Sign in to follow this  
Calin

Moving and rotating objects.

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am a little bit confused about the way you must manipulate your objects in a DX scene. 1.How do you move, rotate several objects in your scene? Do you manipulate each object by changeing vertexes positon within the arrays or do you use for each object the SetTransform function. 2. Do you use a vertex buffer for each object or for the entire scene?

Share this post


Link to post
Share on other sites
Advertisement
In terms of translation, my understanding is that you set up the world matrix before you draw each of your objects, so that your object ends up getting transformed the way you want them to. The vertex data in the array stays constant, you use the matrix to rotate and translate them.

As for the vertex buffer, it sounds like there are differing opinions. You CAN write it all to one buffer, and then use Trianglestrips or other drawing methods to draw triangles from a starting index to an ending index. But then you have the problem of adding in any new vertices or taking any out, which I *believe* is where dynamic vertex buffers come in.

Mike

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!