OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
MWWorld::CellPreloader Class Reference

#include <cellpreloader.hpp>

Collaboration diagram for MWWorld::CellPreloader:

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::ResourceSystemmResourceSystem
 
Resource::BulletShapeManagermBulletShapeManager
 
Terrain::WorldmTerrain
 
osg::ref_ptr
< SceneUtil::WorkQueue
mWorkQueue
 
double mExpiryDelay
 
unsigned int mMinCacheSize
 
unsigned int mMaxCacheSize
 
bool mPreloadInstances
 
PreloadMap mPreloadCells
 

Member Typedef Documentation

Constructor & Destructor Documentation

MWWorld::CellPreloader::CellPreloader ( Resource::ResourceSystem resourceSystem,
Resource::BulletShapeManager bulletShapeManager,
Terrain::World terrain 
)
MWWorld::CellPreloader::~CellPreloader ( )

Member Function Documentation

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.

Note
The cell itself must be in State_Loaded or State_Preloaded.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

void MWWorld::CellPreloader::setMinCacheSize ( unsigned int  num)

The minimum number of preloaded cells before unused cells get thrown out.

Here is the call graph for this function:

void MWWorld::CellPreloader::setPreloadInstances ( bool  preload)

Enables the creation of instances in the preloading thread.

Here is the call graph for this function:

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.

Member Data Documentation

Resource::BulletShapeManager* MWWorld::CellPreloader::mBulletShapeManager
private
double MWWorld::CellPreloader::mExpiryDelay
private
unsigned int MWWorld::CellPreloader::mMaxCacheSize
private
unsigned int MWWorld::CellPreloader::mMinCacheSize
private
PreloadMap MWWorld::CellPreloader::mPreloadCells
private
bool MWWorld::CellPreloader::mPreloadInstances
private
Resource::ResourceSystem* MWWorld::CellPreloader::mResourceSystem
private
Terrain::World* MWWorld::CellPreloader::mTerrain
private
osg::ref_ptr<SceneUtil::WorkQueue> MWWorld::CellPreloader::mWorkQueue
private

The documentation for this class was generated from the following files: