ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter
598 stars 118 forks source link

Progress Indicator / Callback? #20

Closed Robert42 closed 4 years ago

Robert42 commented 6 years ago

Useful for providing a progress bar when loading huge point ply files. Also to allow the user to abort the import process

Suggestion 1

Allow loading the ply file chunk-wise. For example, allow the user to call read with a range of vertices/faces to be loaded.

The user could call read(size_t begin, size_t end) with range like saying, load the vertices from 100000 to 100100. This would also make implementing a progress bar (and aborting the loading process) possible without having to integrate a callback function.

Suggestion 2

Every 10000 vertices or so, a user provided callback function could be called.

ddiakopoulos commented 4 years ago

This feature is being incubated on the https://github.com/ddiakopoulos/tinyply/tree/2.4 branch and should be merged soon!