Adjacent vertex selection API C++?

Adjacent vertex selection API C++?

j.pedlingham.2011
Contributor Contributor
540 Views
1 Reply
Message 1 of 2

Adjacent vertex selection API C++?

j.pedlingham.2011
Contributor
Contributor

Hi,

I am working with the Mudbox SDK, however there seems to be very little activity over there, and I am assuming the meshes are stored similarily so the same question applies?  (Correct me if I'm totally wrong there)

So I'm still having the issue with vertex buffer redrawing (calling redraw does not refresh the vertex buffer apparently), and as stated in another post I 'fix' it (very badly and very slowly), by switching layers.


http://forums.autodesk.com/t5/community-help/moving-vertices-and-redrawing-the-scene-does-not-update...

Now I'm having another vertex issue, which again appears to be possible, but there is zero information on such.  This is when it comes to moving a group of vertices next to each other and how to select these efficiently.

I have used the tools in mudbox and they seem to work extremely smoothly, I wonder how the vertices are selected by the size of the tool.

So far I have a very rudementary method which iterates through the entire array of vertices, and stores those which are 'in range' into my own buffer, ready for manipulation (this selection function is used multiple times for multiple operations).  However, it is incredibly slow for dense meshes (13k polys took 2-7 seconds).

There appears to be a VertexAdjacency class, however there is no documentation on how to use it, and the documentation there seems to describe it as a "do it yourself" job, which confuses me greatly.

Any help would be greatfully recieved, as I am not 100% sure on how the topology is stored within a mesh.  If I knew that, I could start to form my own algorithm.

 

To quickly re-iterate the solution I am looking for, I want to select the vertices within a certain distance from the selected vertex, efficiently.

0 Likes
541 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi,
in know this is a really really old thread but I am just wondering if you ever figured out how the adjacency information is stored? The docs state that the mesh in internally handled via simple indexed based arrays. 
https://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__files_Polygon_API_How_polygons_are_handled_in...

However I kinda find it hard to believe that that is the full story since I simply cant imagine that calls such as 
getConnectedFaces or getConnectedEdges in the MltMeshVertex class iterate over all faces just to retrieve the neighborhood information, which would be really crazy for meshes potentially containing millions of faces. Traditionally this would be sped up by using some intermediate datastructure such has Winged-, Half-Edges etcs.
So I wonder how this is handled internally,. Maybe I am just missing something.

Cheers!

 

0 Likes