BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.87k stars 128 forks source link

make packer optional in atlas maker and do not destroy the charts #31

Closed cdcseacave closed 2 years ago

BrunoLevy commented 2 years ago

Changed a couple of things:

cdcseacave commented 2 years ago

Thank you for these changes. However I'm not sure I follow the reasons here: why texture coordinates are not considered temporary attributes while the charts are? Of course we can recompute them, but using this logic we can recompute the texture coordinates too, so the function could output nothing, right?

BrunoLevy commented 2 years ago

Different reasons:

Geogram is designed like that: there is this Mesh data structure, and a set of functions that read/modify or produce meshes. These functions can internally create a set of temporary attributes, and they destroy them on exit, because they are just a temporary state of the algorithm, not an output. It also makes it possible to change the implementation of an algorithm without breaking the API.