Selecting specific vertices on a mesh?

Blitz3D Forums/Blitz3D Programming/Selecting specific vertices on a mesh?

Mike V(Posted 2004) [#1]
Hello all,

I'm having a bit of a dilemma here and I'm sure it's something that many here are already quite familiar with. I've already searched for it, but either it hasn't been discussed outright, or I'm just not searching the right terms.. Anyway..

I have a terrain that I want to split into tiles and have them line up edge-to-edge in real-time. Now, since they're created out of segments of a single height map, they *should* theoretically line up fine. But, because I'm not one for relying on theory, I'd like to have some kind of code in place that insures that they line up edge to edge.

So, I already have the idea of what I need to do and, overall, how to get it done.. the only thing hanging me up is how to select specific vertices in the terrain mesh. Are they accessed with direct coordinates, like.. for a 32x32 mesh, you might get the last vertex in the last row as 32,0,32.. or... is there another way this is done?

Thanks!


Beaker(Posted 2004) [#2]
Is it a Blitz Terrain or a mesh terrain?


Mike V(Posted 2004) [#3]
In this case, it'd be a mesh terrain...


Beaker(Posted 2004) [#4]
Vertices are just held in a list (in creation order) so you will need a bit of simple maths to turn the x and y grid positions into the index for the correct vertex.

Something like (x * gridheight) + y

Hope this helps.