OpenMW
|
#include <cellpreloader.hpp>
Classes | |
struct | PreloadEntry |
Public Member Functions | |
CellPreloader (Resource::ResourceSystem *resourceSystem, Resource::BulletShapeManager *bulletShapeManager, Terrain::World *terrain) | |
~CellPreloader () | |
void | preload (MWWorld::CellStore *cell, double timestamp) |
void | notifyLoaded (MWWorld::CellStore *cell) |
void | updateCache (double timestamp) |
Removes preloaded cells that have not had a preload request for a while. More... | |
void | setExpiryDelay (double expiryDelay) |
How long to keep a preloaded cell in cache after it's no longer requested. More... | |
void | setMinCacheSize (unsigned int num) |
The minimum number of preloaded cells before unused cells get thrown out. More... | |
void | setMaxCacheSize (unsigned int num) |
The maximum number of preloaded cells. More... | |
void | setPreloadInstances (bool preload) |
Enables the creation of instances in the preloading thread. More... | |
unsigned int | getMaxCacheSize () const |
void | setWorkQueue (osg::ref_ptr< SceneUtil::WorkQueue > workQueue) |
Private Types | |
typedef std::map< const MWWorld::CellStore *, PreloadEntry > | PreloadMap |
Private Attributes | |
Resource::ResourceSystem * | mResourceSystem |
Resource::BulletShapeManager * | mBulletShapeManager |
Terrain::World * | mTerrain |
osg::ref_ptr < SceneUtil::WorkQueue > | mWorkQueue |
double | mExpiryDelay |
unsigned int | mMinCacheSize |
unsigned int | mMaxCacheSize |
bool | mPreloadInstances |
PreloadMap | mPreloadCells |
|
private |
MWWorld::CellPreloader::CellPreloader | ( | Resource::ResourceSystem * | resourceSystem, |
Resource::BulletShapeManager * | bulletShapeManager, | ||
Terrain::World * | terrain | ||
) |
MWWorld::CellPreloader::~CellPreloader | ( | ) |
unsigned int MWWorld::CellPreloader::getMaxCacheSize | ( | ) | const |
void MWWorld::CellPreloader::notifyLoaded | ( | MWWorld::CellStore * | cell | ) |
void MWWorld::CellPreloader::preload | ( | MWWorld::CellStore * | cell, |
double | timestamp | ||
) |
Ask a background thread to preload rendering meshes and collision shapes for objects in this cell.
void MWWorld::CellPreloader::setExpiryDelay | ( | double | expiryDelay | ) |
How long to keep a preloaded cell in cache after it's no longer requested.
void MWWorld::CellPreloader::setMaxCacheSize | ( | unsigned int | num | ) |
The maximum number of preloaded cells.
void MWWorld::CellPreloader::setMinCacheSize | ( | unsigned int | num | ) |
The minimum number of preloaded cells before unused cells get thrown out.
void MWWorld::CellPreloader::setPreloadInstances | ( | bool | preload | ) |
Enables the creation of instances in the preloading thread.
void MWWorld::CellPreloader::setWorkQueue | ( | osg::ref_ptr< SceneUtil::WorkQueue > | workQueue | ) |
void MWWorld::CellPreloader::updateCache | ( | double | timestamp | ) |
Removes preloaded cells that have not had a preload request for a while.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |