Joining meshes

Blitz3D Forums/Blitz3D Beginners Area/Joining meshes

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)

There's a mesh weld function in the archives which will eliminate shared verts.

Stevie

There's probably more than one in the archives - so take a browse through:

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

Thanks guys!!!