Joining meshes

Blitz3D Forums/Blitz3D Beginners Area/Joining meshes

hockings(Posted 2007) [#1]
My game problem is more complex than this as it involves joining meshes with more verticies together, but simplifying it :

If I have 2 squares (4 verticies each) and I want to join the right hand side of the first square, to the left hand side of the second square so there's now one mesh (made of 2 squares joined together).

ie. join

.-. and .-. to become .-.-.
| | | | | | |
.-. .-. .-.-.

Is there an easy way to do this? Particularly is there a clever way that will eliminate the extra 2 verticies (ie. two individual squares = 8 verticies, 2 together = 6 verticies)


Stevie G(Posted 2007) [#2]
There's a mesh weld function in the archives which will eliminate shared verts.

Stevie


puki(Posted 2007) [#3]
There's probably more than one in the archives - so take a browse through:

http://www.blitzbasic.com/codearcs/codearcs.php?cat=12


hockings(Posted 2007) [#4]
Thanks guys!!!