![]() |
VR-Forces Developer's Guide
|
core singleton that manages loading for all the various DtModel subclasses

Public Member Functions | |
| virtual | ~DtBackgroundLoader () |
| virtual void | updateQueue (int max_thread_count, int active_threads) |
| virtual DtLoaderHandle * | queueForLoad (DtModel *object) |
| virtual void | loadIfPossibleOrAddToQueue (DtModel *object) |
| virtual bool | hasActiveAsyncTasks () const |
| virtual int | numModelDefinitionsToIco () const |
| virtual std::string | nextModelDefinitionToIco () |
| virtual int | numOfActiveTasks () const |
| virtual void | addToAdditionalIcoList (osgUtil::StateToCompile *compile) |
| virtual std::list < osgUtil::StateToCompile * > & | additionalToIcoList () |
| virtual bool | multithreadedLoadingActive () const |
| virtual void | setMultithreadedLoadingActive (bool val) |
time management functions | |
how long the system can spend in the main thread before it's stopped. defaults to 2 ms | |
| virtual void | setForegroundTimeBudget (double budget) |
| virtual void | incrementForegroundTime (double time_elapse) |
| virtual bool | isForegroundTimeBudgetExpired () const |
| virtual double | timeSpentThisFrame () const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtBackgroundLoader & | instance (DtDe &de) |
Protected Member Functions | |
| DtBackgroundLoader (DtDe &de) | |
| virtual void | timedForegroundLoad (DtModel *object) |
| virtual void | ts_setModelDefinitionLoaded (const std::string &modelDefinition) |
| virtual bool | ts_isModelDefinitionLoaded (const std::string &modelDefinition) const |
Protected Attributes | |
| DtDe & | myDe |
| boost::mutex | myProducerQueueMutex |
| std::list< DtLoaderHandle * > | myProducerQueue |
| std::list< DtLoaderHandle * > | myForegroundQueue |
| std::list< std::string > | myModelDefsToIcoQueue |
| std::list< DtLoaderHandle * > | myObjectsFinishedWithTBBTask |
| std::list < osgUtil::StateToCompile * > | myAdditionalToIcoList |
| boost::mutex | myTaskFinishedMutex |
| std::list< DtLoaderHandle * > | myObjectsToForegroundLoad |
| std::map< std::string, bool > | myActivelyLoadingModelDefs |
| std::atomic< int > | myNumberOfActiveTasks |
| double | myTimeSpentThisFrame |
| boost::mutex | myMutableLoadedDefMapMutex |
| std::unordered_map < std::string, bool > | myLoadedDefMap |
| double | myForegroundTimeBudget |
| bool | myMultithreadedLoadingActive |
| tbb::task_arena | myTaskArena |
Private Member Functions | |
| DtBackgroundLoader ()=delete | |
| DtBackgroundLoader (const DtBackgroundLoader &)=delete | |
| DtBackgroundLoader & | operator= (const DtBackgroundLoader &)=delete |
Friends | |
| class | DtBackgroundLoadAsyncTask |
|
virtual |
destructor
|
protected |
not allowed directly
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
static |
singleton access
|
privatedelete |
not allowed
|
virtual |
called from the foreground main event loop moves stuff from the producer queue into the consumer one, manages time and does foreground loading
|
virtual |
takes ownership of the handle
|
virtual |
updates how much time has been spend already, allows per frame adjustment of budget
|
virtual |
updates how much time has been spend already, allows per frame adjustment of budget
|
virtual |
returns if foreground time is greater then budget
|
virtual |
returns time spend working in the foreground.
|
virtual |
Spawns off task if definition hasn't been loaded yet, otherwise runs the foreground loading code if there's enough time.
|
virtual |
returns true if there are tasks active in the background
|
virtual |
used by model preloader to decide if there's data to process
|
virtual |
name of the next model to look up definition of and process its ICO data.
|
virtual |
number of current async tasks running
|
virtual |
Can be used to add additional ICO objects, not used currently.
|
virtual |
returns list of additional ICO objects.
|
virtual |
is the system active or disabled, defaults to on
|
virtual |
controls if the system is active
|
protectedvirtual |
runs foreground load code and updates time budgeting.
|
protectedvirtual |
|
protectedvirtual |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |