1 #ifndef OPENMW_MWWORLD_CELLPRELOADER_H
2 #define OPENMW_MWWORLD_CELLPRELOADER_H
12 class BulletShapeManager;
66 void setWorkQueue(osg::ref_ptr<SceneUtil::WorkQueue> workQueue);
88 PreloadEntry(
double timestamp, osg::ref_ptr<SceneUtil::WorkItem> workItem)
101 typedef std::map<const MWWorld::CellStore*, PreloadEntry>
PreloadMap;
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
void setExpiryDelay(double expiryDelay)
How long to keep a preloaded cell in cache after it's no longer requested.
Definition: cellpreloader.cpp:334
osg::ref_ptr< SceneUtil::WorkItem > mTerrainPreloadItem
Definition: cellpreloader.hpp:108
The basic interface for a terrain world. How the terrain chunks are paged and displayed is up to the ...
Definition: world.hpp:52
void setPreloadInstances(bool preload)
Enables the creation of instances in the preloading thread.
Definition: cellpreloader.cpp:349
osg::ref_ptr< SceneUtil::WorkItem > mUpdateCacheItem
Definition: cellpreloader.hpp:109
unsigned int mMaxCacheSize
Definition: cellpreloader.hpp:81
void num(char i, bool last)
Definition: gen_iconv.cpp:12
std::vector< osg::ref_ptr< Terrain::View > > mTerrainViews
Definition: cellpreloader.hpp:106
osg::ref_ptr< SceneUtil::UnrefQueue > mUnrefQueue
Definition: cellpreloader.hpp:78
Resource::ResourceSystem * mResourceSystem
Definition: cellpreloader.hpp:73
void clear()
Definition: cellpreloader.cpp:294
Resource::BulletShapeManager * mBulletShapeManager
Definition: cellpreloader.hpp:74
Definition: cellpreloader.hpp:86
Definition: landmanager.hpp:17
CellPreloader(Resource::ResourceSystem *resourceSystem, Resource::BulletShapeManager *bulletShapeManager, Terrain::World *terrain, MWRender::LandManager *landManager)
Definition: cellpreloader.cpp:190
void preload(MWWorld::CellStore *cell, double timestamp)
Definition: cellpreloader.cpp:227
void setMinCacheSize(unsigned int num)
The minimum number of preloaded cells before unused cells get thrown out.
Definition: cellpreloader.cpp:339
PreloadEntry(double timestamp, osg::ref_ptr< SceneUtil::WorkItem > workItem)
Definition: cellpreloader.hpp:88
bool mPreloadInstances
Definition: cellpreloader.hpp:82
~CellPreloader()
Definition: cellpreloader.cpp:203
std::vector< osg::Vec3f > mTerrainPreloadPositions
Definition: cellpreloader.hpp:107
osg::ref_ptr< SceneUtil::WorkQueue > mWorkQueue
Definition: cellpreloader.hpp:77
std::map< const MWWorld::CellStore *, PreloadEntry > PreloadMap
Definition: cellpreloader.hpp:101
Mutable state of a cell.
Definition: cellstore.hpp:51
void setUnrefQueue(SceneUtil::UnrefQueue *unrefQueue)
Definition: cellpreloader.cpp:364
double mLastResourceCacheUpdate
Definition: cellpreloader.hpp:84
PreloadMap mPreloadCells
Definition: cellpreloader.hpp:104
void setMaxCacheSize(unsigned int num)
The maximum number of preloaded cells.
Definition: cellpreloader.cpp:344
unsigned int mMinCacheSize
Definition: cellpreloader.hpp:80
void setWorkQueue(osg::ref_ptr< SceneUtil::WorkQueue > workQueue)
Definition: cellpreloader.cpp:359
Terrain::World * mTerrain
Definition: cellpreloader.hpp:75
double mExpiryDelay
Definition: cellpreloader.hpp:79
Handles unreferencing of objects through the WorkQueue. Typical use scenario would be the main thread...
Definition: unrefqueue.hpp:24
double mTimeStamp
Definition: cellpreloader.hpp:98
void notifyLoaded(MWWorld::CellStore *cell)
Definition: cellpreloader.cpp:278
void setTerrainPreloadPositions(const std::vector< osg::Vec3f > &positions)
Definition: cellpreloader.cpp:401
unsigned int getMaxCacheSize() const
Definition: cellpreloader.cpp:354
MWRender::LandManager * mLandManager
Definition: cellpreloader.hpp:76
Definition: bulletshapemanager.hpp:25
void updateCache(double timestamp)
Removes preloaded cells that have not had a preload request for a while.
Definition: cellpreloader.cpp:308
osg::ref_ptr< SceneUtil::WorkItem > mWorkItem
Definition: cellpreloader.hpp:99
PreloadEntry()
Definition: cellpreloader.hpp:93
Definition: cellpreloader.hpp:35