• Advertisement
Sign in to follow this  

How to manipulate edges of a mesh?

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

Hi, What D3D9 functions allow me to manipulate/control the edges of a mesh? How can I add vertices within an edge? I have heard about adjacency, and have no ideas how to deal with that... Thanks in advance Jack

Share this post


Link to post
Share on other sites
Advertisement
Direct3D only really deals with triangles and vertices. Obviously, edges are implicit in this but you can't explicitly manipulate a mesh in terms of them.

What you'd need to do is find the two triangles (ID3DXMesh::GenerateAdjacency() will be useful here) and sub-divide them accordingly.

If you know the edge you're interested in you can determine the start/end vertex and then simply scan the mesh's index buffer for all faces that share those two vertices. It could get quite messy trying to insert new triangles into the middle, especially with a fixed sized buffer but also because of the attribute table used when rendering.

hth
Jack

Share this post


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

  • Advertisement