Laravel-Challenge-Cleanup-Routes
Laravel-Challenge-Cleanup-Routes copied to clipboard
files
We should also have the option to export geometry as loose cubes (allowing for "mining" and animating) or connected solid (faster export, less complex, smaller file size)
Looks like the .obj format is probably the best one to choose. The definitive source on the format is actually wikipedia:
https://en.wikipedia.org/wiki/Wavefront_.obj_file
This article is also a great intro:
https://all3dp.com/1/obj-file-format-3d-printing-cad/
Ha, found it! The spec for both .obj and .mtl: https://stackoverflow.com/a/11496625/1460422
...though Wikipedia might be more readable :P
I've implemented 3 new classes:
- Vector3 - A 3-dimensional vector, fully covered with tests with busted
- Face - A single face
- Mesh - A mesh of faces
The intention here is that together, these classes can serve as an intermediary between a mesh exporter / generator, and any potential output writers. This way, we can support more than 1 output file format in the future. It also allows for arbitrary transformations and optimisations to be performed on said mesh before it is passed to an exporter, thereby saving both computation time serialising and file size on disk.
Vector3, of course, should prove very useful indeed in many other places in the WorldEditAdditions codebase.
Another thing worth investigating is importing. Since there's already a mod for exporting, it might be worth focusing on the importing process first before later moving on to integrate with the mod (whose name I forget) for exporting.
...before later moving on to integrate with the mod (whose name I forget) for exporting.
I believe you mean Meshport. Also meshport export can be buggy at times especially in its mishandling of transparent nodes or clusters of them.
The Meshport code would need to be refined and better tested if we were to integrate it.
Ah, by integrate it may be best to integrate with the mod - i.e. add an optional dependency on it - assuming it has a public API.