Jump to content
• Advertisement

# Rotating portions of vertex buffer around an arbitrary axis

This topic is 3896 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

In directX 9, I've got a vertex buffer I want to lock a portion of, rotate the verticies in that locked area around an arbitrary axis. I don't want to just multiply the matrix of the entire buffer by a transformation matrix, I want to change the x, y and z values of each vertex to have the rotation. How would I go about doing this? I know how to lock the buffer and change the vertex position data, I just don't know how to perform the rotation and get the new x, y, z coords. Cheers. [Edited by - Citizen Erased on November 21, 2007 8:46:22 AM]

#### Share this post

##### Share on other sites
Advertisement
D3DXMatrixRotationAxis will produce the transformation matrix you need. To apply this to a contiguous set of vertices, lock the vertex buffer up and use D3DXVec3TransformArray.

#### Share this post

##### Share on other sites
i think your problem might be that you're send down the matrix with the vertex buffer so that it is *rendered* with that transformation, but what you want to do is actually change the mesh. is that right?

it's been a while since i've used d3d, but aren't there dynamic vertex buffers? i think that's what you need.

#### Share this post

##### Share on other sites
Thanks TheAdmiral, that's exactly what I was looking for.

#### Share this post

##### Share on other sites
Thanks TheAdmiral, that's exactly what I was looking for.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5
• Advertisement

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631785
• Total Posts
3002348
×

## 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!