Well, I think when you only remove some tris, you still have those Tris that are intersecting the mirror surface, and this may look wrong.
What I would suggest to do, if you realy want to remake the CreateMirror command this way, is the following:
Create a clone of the mesh with all tris that are above the mirror. There shouldn't be a problem with shared vertices if you use the Trianglevertex Function together with the CountTriangles Command etc.
You would create the meshes from scratch, by adding the Surfaces and Triangles one by one, ignoring those you don't want to be part of the clone mesh.
Then you create an additional mesh that contains all Tris that ARE INTERSECTING the mirror, means one or two Vertices of each Triangle are below and the other one or two are above the mirror.
Then you take the Fast CSG Functions in the code archive (guess by Markus Rauch) and cut off the part of the INTERSECTION mesh that is below the mirror. The reason why you create a seperate Mesh for the intersecting parts is: Speed.
THen you flip both, intersection mesh and above-part mesh. There is still one tiny but hard problem: After cutting the intersection mesh, you need to set the UV Coords for the new Tris created by the CSG operation. Now this seems to be the most tricky part. Some 3D Gurus may be able to do it easily, but personally I couldn't do it.
Maybe you should think about to make a CreateMirrorRect(x,y,z,w,h,d,p,y,r) command instead, that will allow to use cubic enviroment mapping with any beloved rectangular quad mesh of whatever size and orientation.
At least all Mirrors in the Level would require only one Cubic-6-Render pass alltogether - and you could also use it for other things (chrome FX etc.) too.
What I would suggest to do, if you realy want to remake the CreateMirror command this way, is the following:
Create a clone of the mesh with all tris that are above the mirror. There shouldn't be a problem with shared vertices if you use the Trianglevertex Function together with the CountTriangles Command etc.
You would create the meshes from scratch, by adding the Surfaces and Triangles one by one, ignoring those you don't want to be part of the clone mesh.
Then you create an additional mesh that contains all Tris that ARE INTERSECTING the mirror, means one or two Vertices of each Triangle are below and the other one or two are above the mirror.
Then you take the Fast CSG Functions in the code archive (guess by Markus Rauch) and cut off the part of the INTERSECTION mesh that is below the mirror. The reason why you create a seperate Mesh for the intersecting parts is: Speed.
THen you flip both, intersection mesh and above-part mesh. There is still one tiny but hard problem: After cutting the intersection mesh, you need to set the UV Coords for the new Tris created by the CSG operation. Now this seems to be the most tricky part. Some 3D Gurus may be able to do it easily, but personally I couldn't do it.
Maybe you should think about to make a CreateMirrorRect(x,y,z,w,h,d,p,y,r) command instead, that will allow to use cubic enviroment mapping with any beloved rectangular quad mesh of whatever size and orientation.
At least all Mirrors in the Level would require only one Cubic-6-Render pass alltogether - and you could also use it for other things (chrome FX etc.) too.