So I've been working on some code to get the floor from a point-cloud mesh. Untill now, I've achieved to get the triangles that make up this floor mesh, but now I want to create a flat plane to cover those points to represent a flat floor.
Oke, just to make it a bit more clear. Right now I've got this Mesh. (triangles, vertices and normals). I want to create a plane or something simular to cover this mesh to represent the floor (since this floor is not as flat as an actual floor should be).
It should create 1 or multiple planes to cover the encapsulated area
I do know of a library to use that calculates what an area should be based on some key-points. So if I would be able to get for example these points from the mesh (See below) it would create the following objects (See further below). This would also give me the desired result.
If someone has done something simular before or has an idea of how to solve this issue, I would be very gratefull :).
(I'm using Unity and C# btw)
One last thing to note about this mesh is sadly that not all triangles connect very well to each other. So there are points in the middle of the mesh that stick out a little bit. This makes it harder to check if a triangle is on a corner.