![]() |
VR-Forces 4.10 Class Documentation
|
Contains DtCutoutCache. Binary db for storing cached osgearth cutouts. More...
Classes | |
| struct | Record |
| Data for masks in a given tilekey. More... | |
Public Member Functions | |
| DtCutoutCache (const DtFilename &filename, const osgEarth::Profile *profile, bool erasePrevious=false) | |
| Constructor. More... | |
| virtual | ~DtCutoutCache () |
| Virtual destructor. More... | |
| virtual boost::shared_ptr< Record > | read (const osgEarth::TileKey &key) |
| Return cutout data for a given tilekey. More... | |
| virtual void | write (const osgEarth::TileKey &key, const DtCollisionObjectList &objects, const DtTileData::Extent::Vector &maskExtents) |
| Write data to the cache and add it to the map. More... | |
| virtual void | clear () |
| clear the cache (on rewind for example) More... | |
Protected Types | |
| typedef std::map < osgEarth::TileKey, boost::shared_ptr< Record > > | CacheMap |
Protected Member Functions | |
| void | fillCache () |
Protected Attributes | |
| DtObjectDB::Ptr | myObjectDB |
| boost::scoped_ptr < DtObjectDB::Cursor > | myCursor |
| osg::ref_ptr< const osgEarth::Profile > | myProfile |
| DtObjectDB::Offset | myNextWriteLocationOffset |
| offset in the file where we store the offset where the record will be written. More... | |
| DtObjectDB::Offset | myNextWriteLocation |
| offset in the file where the next record will be written. More... | |
| CacheMap | myCacheMap |
| tbb::spin_rw_mutex | myCacheMutex |
| const std::string | myCacheFilename |
Contains DtCutoutCache. Binary db for storing cached osgearth cutouts.
Cache for mask extents and skirt geometry generated by osgearth for cutouts. Generating this data is slow so caching it greatly increasing terrain loading in areas that intersect the cutouts. Existing data is read from the cache file in the constructor. New data is appended in the write function.
|
protected |
|
explicit |
Constructor.
| filename | Path to cache file. Will be created if it doesn't exist. |
| profile | osgearth profile for the terrain. |
| erasePrevious | if true then previous cache file will be erased if it exists. |
|
virtual |
Virtual destructor.
|
virtual |
Return cutout data for a given tilekey.
This function does not access the disk. Returns null if the data for the key is not in the cache. The caller must then generate the data and then add it by calling write.
|
virtual |
Write data to the cache and add it to the map.
Data added here will be returned by future calls to read.
|
virtual |
clear the cache (on rewind for example)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
offset in the file where we store the offset where the record will be written.
|
protected |
offset in the file where the next record will be written.
|
protected |
|
mutableprotected |
|
protected |