vleue / polyanya

Pathfinding using Polyanya
Apache License 2.0
280 stars 20 forks source link

Mirror the read API to create a mesh file #37

Closed MJohnson459 closed 1 year ago

MJohnson459 commented 1 year ago

While debugging it was useful to generate a mesh file that could be viewed and shared easily.

This PR adds the mirror functions for writing a Mesh to a file. Given it's purpose is for debugging I didn't spend too long making the API nicer and just copied what was there.

        let file: PolyanyaFile = mesh.into();
        file.to_file(&"nav_mesh.poly");