class OSGDB_EXPORT osgDB::DatabasePager

Database paging class which manages the loading of files in a background thread, and syncronizing of loaded models with the main scene graph

Inheritance:


Public Methods

[more] DatabasePager()
[more]virtual void requestNodeFile(const std::string& fileName, osg::Group* group)
Add a request to load a node file to end the the database request list
[more]virtual void run()
run does the database paging
[more]void addLoadedDataToSceneGraph(double timeStamp)
Add the loaded data to the scene graph
[more]void registerPagedLODs(osg::Node* subgraph)
Find all PagedLOD nodes in a subgraph and register them with the DatabasePager so it can keep track of expired nodes.
[more]void setExpiryDelay(double expiryDelay)
Set the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed
[more]double getExpiryDelay() const
Get the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed
[more]void setDeleteRemovedSubgraphsInDatabaseThread(bool flag)
set whether the removed subgraphs should be deleted in the database thread or not
[more]bool getDeleteRemovedSubgraphsInDatabaseThread() const
get whether the removed subgraphs should be deleted in the database thread or not
[more]void removeExpiredSubgraphs(double currentFrameTime)
Iterate through the active PagedLOD nodes children removing children which havn't been visited since specified expiryTime.
[more]void setCompileRenderingObjectsForContexID(unsigned int contextID, bool on)
Turn the compilation of rendering objects for specfied graphics context on (true) or off(false)
[more]bool getCompileRenderingObjectsForContexID(unsigned int contextID)
Get whether the compilation of rendering objects for specfied graphics context on (true) or off(false)
[more]void compileRenderingObjects(osg::State& state, double& availableTime)
Compile the rendering objects (display lists,texture objects, VBO's) on loaded subgraph.

Public Members

[more]typedef std::vector< osg::ref_ptr<osg::PagedLOD> > PagedLODList
[more]typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList
[more]typedef std::vector< osg::ref_ptr<osg::Drawable> > DrawableList
[more]typedef std::pair<StateSetList,DrawableList> DataToCompile
[more]typedef std::map< unsigned int, DataToCompile > DataToCompileMap
[more]typedef std::set<unsigned int> ActiveGraphicsContexts

Protected Fields

[more]DatabaseRequestList _fileRequestList
[more]OpenThreads::Mutex _fileRequestListMutex
[more]DatabaseRequestList _dataToCompileList
[more]OpenThreads::Mutex _dataToCompileListMutex
[more]bool _deleteRemovedSubgraphsInDatabaseThread
[more]osg::NodeList _childrenToDeleteList
[more]OpenThreads::Mutex _childrenToDeleteListMutex
[more]DatabaseRequestList _dataToMergeList
[more]OpenThreads::Mutex _dataToMergeListMutex
[more]PagedLODList _pagedLODList
[more]double _expiryDelay
[more]ActiveGraphicsContexts _activeGraphicsContexts

Protected Methods

[more]virtual ~DatabasePager()

Protected Members

[more]struct DatabaseRequest: public osg::Referenced
[more]typedef std::vector< osg::ref_ptr<DatabaseRequest> > DatabaseRequestList


Documentation

Database paging class which manages the loading of files in a background thread, and syncronizing of loaded models with the main scene graph
o DatabasePager()

ovirtual void requestNodeFile(const std::string& fileName, osg::Group* group)
Add a request to load a node file to end the the database request list

ovirtual void run()
run does the database paging

ovoid addLoadedDataToSceneGraph(double timeStamp)
Add the loaded data to the scene graph

ovoid registerPagedLODs(osg::Node* subgraph)
Find all PagedLOD nodes in a subgraph and register them with the DatabasePager so it can keep track of expired nodes. note, should be only be called from the update thread.

ovoid setExpiryDelay(double expiryDelay)
Set the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed

odouble getExpiryDelay() const
Get the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed

ovoid setDeleteRemovedSubgraphsInDatabaseThread(bool flag)
set whether the removed subgraphs should be deleted in the database thread or not

obool getDeleteRemovedSubgraphsInDatabaseThread() const
get whether the removed subgraphs should be deleted in the database thread or not

ovoid removeExpiredSubgraphs(double currentFrameTime)
Iterate through the active PagedLOD nodes children removing children which havn't been visited since specified expiryTime. note, should be only be called from the update thread.

ovoid setCompileRenderingObjectsForContexID(unsigned int contextID, bool on)
Turn the compilation of rendering objects for specfied graphics context on (true) or off(false)

obool getCompileRenderingObjectsForContexID(unsigned int contextID)
Get whether the compilation of rendering objects for specfied graphics context on (true) or off(false)

ovoid compileRenderingObjects(osg::State& state, double& availableTime)
Compile the rendering objects (display lists,texture objects, VBO's) on loaded subgraph. note, should only be called from the draw thread.

otypedef std::vector< osg::ref_ptr<osg::PagedLOD> > PagedLODList

otypedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList

otypedef std::vector< osg::ref_ptr<osg::Drawable> > DrawableList

otypedef std::pair<StateSetList,DrawableList> DataToCompile

otypedef std::map< unsigned int, DataToCompile > DataToCompileMap

otypedef std::set<unsigned int> ActiveGraphicsContexts

ovirtual ~DatabasePager()

ostruct DatabaseRequest: public osg::Referenced

o DatabaseRequest()

ostd::string _fileName

ounsigned int _numOfRequests

oosg::ref_ptr<osg::Group> _groupForAddingLoadedSubgraph

oosg::ref_ptr<osg::Node> _loadedModel

oDataToCompileMap _dataToCompileMap

otypedef std::vector< osg::ref_ptr<DatabaseRequest> > DatabaseRequestList

oDatabaseRequestList _fileRequestList

oOpenThreads::Mutex _fileRequestListMutex

oDatabaseRequestList _dataToCompileList

oOpenThreads::Mutex _dataToCompileListMutex

obool _deleteRemovedSubgraphsInDatabaseThread

oosg::NodeList _childrenToDeleteList

oOpenThreads::Mutex _childrenToDeleteListMutex

oDatabaseRequestList _dataToMergeList

oOpenThreads::Mutex _dataToMergeListMutex

oPagedLODList _pagedLODList

odouble _expiryDelay

oActiveGraphicsContexts _activeGraphicsContexts


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.