assimp/code
Jan Krassnigg 1e93280f47 Infrastructure for reporting progress
This commit adds two classes:
* ProgressTracker
* ProgressScope

The first is for users to implement, and to instantiate when they desire
to get informed about the overall progress.

The second is to be added to all functions that may take a considerable
amount of time, such that they can report back how far along they are.

These are much more convenient to use than the existing ProgressHandler.
ProgressScope is designed such that it only requires "local knowledge"
about upcoming and finished work. Scopes are nested and combined to
form the final global progress.

The active ProgressTracker is stored in a thread_local pointer.
This is a consicius decision since in assimp there is often no 'context'
passed through. The ProgressTracker may be needed anywhere, and it would
be tedious and a huge change to pass it through to every function.
Therefore, using a thread_local variable makes it accessible everywhere,
without a major interface change. Since assimmp is single-threaded,
but may be run in parallel on multiple threads, a thread_local is a
good trade-off, in my opinion.

This change only adds few uses of ProgressScope, to generally show how
it would be used. Also for our use cases these where the most pressing
places to add progress reporting, so this already covers loading from FBX
files pretty well.
2023-08-01 14:06:12 +02:00
..
AssetLib Infrastructure for reporting progress 2023-08-01 14:06:12 +02:00
CApi Fix: Remove buggy namespace declaration 2023-03-10 09:00:37 +01:00
Common Infrastructure for reporting progress 2023-08-01 14:06:12 +02:00
Geometry Reafctoring: Add GeoUtils usage 2023-05-04 20:57:20 +02:00
Material Add missing include 2023-06-03 16:28:55 +02:00
Pbrt Fix PBRT exporter coordinate system 2023-05-03 16:52:33 +02:00
PostProcessing Infrastructure for reporting progress 2023-08-01 14:06:12 +02:00
res Use mingw.include 2022-06-30 20:58:34 +02:00
.editorconfig Implemented: Add editor config for source code 2015-06-28 15:50:57 -06:00
CMakeLists.txt Infrastructure for reporting progress 2023-08-01 14:06:12 +02:00