Delete vertex?

Blitz3D Forums/Blitz3D Programming/Delete vertex?

Pongo(Posted 2004) [#1]
Ok,... since there is no deletevertex command, what do you do to get around it? Destroy/re-create the mesh? Move extra(deleted) vertices to some far off point? Something else?


Beaker(Posted 2004) [#2]
Re-create the mesh.


DJWoodgate(Posted 2004) [#3]
Something to bear in mind is that moving verts to some far off point will effect the meshes bounding box and hence what blitz is able to cull. (Blitz calculates a bounding box for each mesh for graphics culling purposes, this is different from the Entitybox specification used for collisions etc). I believe the graphics card will not be updated with a mesh until its bounding box intersects the viewing frustum.

You could just rebuild the triangles, and keep track of the unused verts for reuse, perhaps shifting them to within the new bounding volume, or rebuild the whole mesh. I understand rebuilding just the triangles should be quicker, but it probably depends on what you are doing, how much and how often you are modifying the mesh, how detailed it is and so on. As Beaker says just rebuilding the whole thing is likely to be the easiest option.


Wayne(Posted 2004) [#4]
You got it Pongo!


Wayne(Posted 2004) [#5]
You got it Pongo!