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
-
DatabasePager()
-
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
-
virtual void run()
- run does the database paging
-
void addLoadedDataToSceneGraph(double timeStamp)
- Add the loaded data to the scene graph
-
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.
-
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
-
double getExpiryDelay() const
- Get the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed
-
void setDeleteRemovedSubgraphsInDatabaseThread(bool flag)
- set whether the removed subgraphs should be deleted in the database thread or not
-
bool getDeleteRemovedSubgraphsInDatabaseThread() const
- get whether the removed subgraphs should be deleted in the database thread or not
-
void removeExpiredSubgraphs(double currentFrameTime)
- Iterate through the active PagedLOD nodes children removing children which havn't been visited since specified expiryTime.
-
void setCompileRenderingObjectsForContexID(unsigned int contextID, bool on)
- Turn the compilation of rendering objects for specfied graphics context on (true) or off(false)
-
bool getCompileRenderingObjectsForContexID(unsigned int contextID)
- Get whether the compilation of rendering objects for specfied graphics context on (true) or off(false)
-
void compileRenderingObjects(osg::State& state, double& availableTime)
- Compile the rendering objects (display lists,texture objects, VBO's) on loaded subgraph.
Public Members
-
typedef std::vector< osg::ref_ptr<osg::PagedLOD> > PagedLODList
-
typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList
-
typedef std::vector< osg::ref_ptr<osg::Drawable> > DrawableList
-
typedef std::pair<StateSetList,DrawableList> DataToCompile
-
typedef std::map< unsigned int, DataToCompile > DataToCompileMap
-
typedef std::set<unsigned int> ActiveGraphicsContexts
Protected Fields
-
DatabaseRequestList _fileRequestList
-
OpenThreads::Mutex _fileRequestListMutex
-
DatabaseRequestList _dataToCompileList
-
OpenThreads::Mutex _dataToCompileListMutex
-
bool _deleteRemovedSubgraphsInDatabaseThread
-
osg::NodeList _childrenToDeleteList
-
OpenThreads::Mutex _childrenToDeleteListMutex
-
DatabaseRequestList _dataToMergeList
-
OpenThreads::Mutex _dataToMergeListMutex
-
PagedLODList _pagedLODList
-
double _expiryDelay
-
ActiveGraphicsContexts _activeGraphicsContexts
Protected Methods
-
virtual ~DatabasePager()
Protected Members
-
struct DatabaseRequest: public osg::Referenced
-
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
- DatabasePager()
- 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
- virtual void run()
- run does the database paging
- void addLoadedDataToSceneGraph(double timeStamp)
- Add the loaded data to the scene graph
- 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.
note, should be only be called from the update thread.
- 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
- double getExpiryDelay() const
- Get the amount of time that a subgraph will be kept without being visited in the cull traversal
before being removed
- void setDeleteRemovedSubgraphsInDatabaseThread(bool flag)
- set whether the removed subgraphs should be deleted in the database thread or not
- bool getDeleteRemovedSubgraphsInDatabaseThread() const
- get whether the removed subgraphs should be deleted in the database thread or not
- void 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.
- void setCompileRenderingObjectsForContexID(unsigned int contextID, bool on)
- Turn the compilation of rendering objects for specfied graphics context on (true) or off(false)
- bool getCompileRenderingObjectsForContexID(unsigned int contextID)
- Get whether the compilation of rendering objects for specfied graphics context on (true) or off(false)
- void 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.
- typedef std::vector< osg::ref_ptr<osg::PagedLOD> > PagedLODList
- typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList
- typedef std::vector< osg::ref_ptr<osg::Drawable> > DrawableList
- typedef std::pair<StateSetList,DrawableList> DataToCompile
- typedef std::map< unsigned int, DataToCompile > DataToCompileMap
- typedef std::set<unsigned int> ActiveGraphicsContexts
- virtual ~DatabasePager()
- struct DatabaseRequest: public osg::Referenced
- DatabaseRequest()
- std::string _fileName
- unsigned int _numOfRequests
- osg::ref_ptr<osg::Group> _groupForAddingLoadedSubgraph
- osg::ref_ptr<osg::Node> _loadedModel
- DataToCompileMap _dataToCompileMap
- typedef std::vector< osg::ref_ptr<DatabaseRequest> > DatabaseRequestList
- DatabaseRequestList _fileRequestList
- OpenThreads::Mutex _fileRequestListMutex
- DatabaseRequestList _dataToCompileList
- OpenThreads::Mutex _dataToCompileListMutex
- bool _deleteRemovedSubgraphsInDatabaseThread
- osg::NodeList _childrenToDeleteList
- OpenThreads::Mutex _childrenToDeleteListMutex
- DatabaseRequestList _dataToMergeList
- OpenThreads::Mutex _dataToMergeListMutex
- PagedLODList _pagedLODList
- double _expiryDelay
- ActiveGraphicsContexts _activeGraphicsContexts
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.