![]() |
VR-Forces 4.10 Class Documentation
|
core singleton that manages loading for all the various DtModel subclasses More...

Public Member Functions | |
| DtBackgroundLoader (DtDe &de) | |
| virtual | ~DtBackgroundLoader () |
| virtual void | updateQueue (int max_thread_count, int active_threads) |
| called from the foreground main event loop moves stuff from the producer queue into the consumer one, manages time and does foreground loading More... | |
| virtual DtLoaderHandle * | queueForLoad (DtModel *object) |
| takes ownership of the handle More... | |
| virtual void | loadIfPossibleOrAddToQueue (DtModel *object) |
| Spawns off task if definition hasn't been loaded yet, otherwise runs the foreground loading code if there's enough time. More... | |
| virtual bool | hasActiveAsyncTasks () const |
| returns true if there are tasks active in the background More... | |
| virtual int | numModelDefinitionsToIco () const |
| used by model preloader to decide if there's data to process More... | |
| virtual std::string | nextModelDefinitionToIco () |
| name of the next model to look up definition of and process its ICO data. More... | |
| virtual int | numOfActiveTasks () const |
| number of current async tasks running More... | |
| virtual void | addToAdditionalIcoList (osgUtil::StateToCompile *compile) |
| Can be used to add additional ICO objects, not used currently. More... | |
| virtual std::list < osgUtil::StateToCompile * > & | additionalToIcoList () |
| returns list of additional ICO objects, not used currently. More... | |
| virtual bool | multithreadedLoadingActive () const |
| is the system active or disabled, defaults to on More... | |
| virtual void | setMultithreadedLoadingActive (bool val) |
| controls if the system is active More... | |
| DtDe & | de () |
| returns the de More... | |
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) |
| updates how much time has been spend already, allows per frame adjustment of budget More... | |
| virtual bool | isForegroundTimeBudgetExpired () const |
| returns if foreground time is greater then budget More... | |
| virtual double | timeSpentThisFrame () const |
| returns time spend working in the foreground. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtBackgroundLoader & | instance (DtDe &de) |
| Get/create the DtLightPointManager instance. More... | |
| static void | registerInstance (DtDe &de, DtBackgroundLoader *manager) |
| static const std::string & | theClassName () |
| Get the name used to register this class. More... | |
Protected Member Functions | |
| virtual void | timedForegroundLoad (DtModel *object) |
| runs foreground load code and updates time budgeting. More... | |
| 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 |
| tbb::atomic< int > | myNumberOfActiveTasks |
| double | myTimeSpentThisFrame |
| boost::mutex | myMutableLoadedDefMapMutex |
| boost::unordered_map < std::string, bool > | myLoadedDefMap |
| double | myForegroundTimeBudget |
| bool | myMultithreadedLoadingActive |
Friends | |
| class | DtBackgroundLoadAsyncTask |
core singleton that manages loading for all the various DtModel subclasses
| makVrv::DtBackgroundLoader::DtBackgroundLoader | ( | DtDe & | de | ) |
|
virtual |
|
static |
Get/create the DtLightPointManager instance.
use de.registerInstance(DtLightPointManager::theClassName(),) to override the class instance
|
static |
|
static |
Get the name used to register this class.
|
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 |
|
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, not used currently.
|
virtual |
is the system active or disabled, defaults to on
|
virtual |
controls if the system is active
|
inline |
returns the de
|
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 |