..connected vertices..

Blitz3D Forums/Blitz3D Programming/..connected vertices..

Naughty Alien(Posted 2010) [#1]
..it was quite some time, I was using B3D, but recently I have received request to update proggy i have done 4 years ago, done with B3D..anyway, Im wondering how should i get information, which vertices are connected in flat plane mesh(or any mesh for that matter)..for instance..vertice 1 is connected to vertice 2 and vertice 4..and so on..but how should i retrieve this information from B3D ?? Example on pic is just simplified explanation, and im not talking about accessing vertice by vertice, but retrieving info about connected vertices with chosen one??




Matty(Posted 2010) [#2]
Does the "TriangleVertex" command help?

It returns the vertex connected to a specific triangle

http://blitzbasic.com/b3ddocs/command.php?name=TriangleVertex&ref=3d_cat


Rroff(Posted 2010) [#3]
As far as I'm aware there isn't a way to do it short of looping through the triangleverts command as mentioned above comparing against the the vert your testing.


puki(Posted 2010) [#4]
You can store this info at run-time in an array or similar. For a flat mesh, it is going to be mathmatical - ie moving left to right, the next vertice is always +1 - the bottom vertice will always be +3 - going backwards (once you hit the bottom right vertice) it will be -1 and -3. So, basically, for a flat mesh/plane, you can always know based on the before-mentioned.