slicing a mesh

I’m looking for some info on cutting a mesh. I think I have a process.

I want a laser beam to shoot into a 2d mesh (for a 2d game). First, the faces that overlap the laser are to be removed. Next, the four laser penetration vertex points are added (the two have to be calculated somehow). Then, the whole thing is Delaunayed. Finally the face is popped out.

I see a lot of problems on the horizon: I want the mesh to be a Bullet collision mesh, but I’m wondering if the engine will explode if I change the geometry data while it’s running. I don’t want the texture to jitter every time it’s projected on the mesh. Also, I would like the points to be in some sort of order so I could extrude the shape into 3d for use with panda lighting. There’s probably more to consider. Does anyone have any experience with something like this?

Edit: What happens if the laser cuts the object in two? I don’t want Delaunay gluing my objects together. Also, how do I determine if the one object became two for the physics engine?

Edit: does panda3d have a Delaunay triangulator? I saw something on the wiki under Bullet softbodies.

I had started some work about slicing a mesh some time ago. I sticked to an infinite plane katana, which keeps things simpler than with the beam you’re thinking about, but there might be some code in there that could help you.

That’s really cool. Your program reminds me of the new metal gear solid game. The mesh generator is very useful.

I notice that the program always separates mesh objects into two new physics objects. I have to find a way to determine if the the mesh is split or not. I’ll post the code if I get it to work.