Hey, i am trying to build a multibody from a weighted graph, the weights define the shape of a bodypart and the edges and vertices symbolize bones and joints.
Input: A List of vertices with, a vertice is defined by it two coordinates, a list of edges, an edge is defined by the two indices to the corresponding vertices. The weight is simply the distance of two vertices.
Since i want this to be done automatically, i can not do it bodypart by bodypart manually.
However i have not been able to automize it. I try to loop over the edges and always add new edges to an existing body, however this is not working since i would need to store the bodys somewhere in a loop to access them later and rust doesnt allow this.
Now i wanted to ask if there is a specific technique for building these multibodies? (Note the graph is simple and connected).
Thanks in advance