Search code examples
data-structuresformatcloudpoint-clouds

Point cloud file format?


I need to setup a hard-coded point cloud in my video game, which determines which are the next inputs the user is allowed to do. For example, after a "delete" input, the user would be allowed to input "Enter" to validate or "Escape" to cancel.

Currently, I'm manually linking cloud point couples together in the code, but as you can imagine it is not a maintainable solution, nor easy to visualize.

I was wondering if there exists some kind of general purpose file format that would allow me to design my point cloud using some kind of desktop editor, and then use a library to import this point cloud into my program. Something that would be general like JSON or XML, but specifically designed for point clouds. (btw I know JSON/XML are not exactly file formats).

My searches on internet point me to 3D modelling file formats, but I don't think those would be suited for my case as they probably carry a lot of 3D modelling-related data I have no use for.

Is anyone aware of such file format / editor ?


Solution

  • So, what I'm gonna do, is use draw.io (https://app.diagrams.net/)

    It provides a desktop app which I can download, so that I don't rely on a third party website that could shutdown any day.

    And it allows to save diagrams as XML files. The resulting XML is rather unfriendly, because it contains styling elements and other things I don't care about, but I could identify key elements in that XML that would allow me to parse it rather easily and generate in memory my cloud points.