Is it possible to delete triangles?

Blitz3D Forums/Blitz3D Beginners Area/Is it possible to delete triangles?

octothorpe(Posted 2005) [#1]
Is it possible to delete triangles? Or delete all the triangles from a surface, without deleting triangles on other surfaces?


Andy(Posted 2005) [#2]
No, you have to rebuild the mesh


Andy


Beaker(Posted 2005) [#3]
You can however delete *all* triangles or *all* vertices or both (meaning you kill the surface) using the ClearSurface command.


Ice9(Posted 2005) [#4]
Or you can edit your surface texture and paint the area
occupied by the triangle with a the mask color.

depends on why you want to delete teh triangle


octothorpe(Posted 2005) [#5]
Thanks everyone. :)

I have a large, tiled map upon which I need to be able to highlight arbitrary tiles to show ranges of movement or areas of effect. I was hoping to avoid doubling my triangle count by having a second mesh/surface with a copy of all the vertices from the original map, but only creating the triangles I needed to display and removing them afterwards.

Since it's not possible to delete individual triangles, my current solution is to create all the triangles and set their VertexTexCoords() to show only a masked area of my texture. Then, as needed, I modify their VertexTexCoords() to show a highlight texture.

If anyone has a better approach, I'd love to hear about it! :)


GitTech(Posted 2005) [#6]
Use ClearSurface() to delete all the triangles, but not the vertices. Then build the desired triangles.


octothorpe(Posted 2005) [#7]
Beautiful, thanks :)