VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cutoutCache.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
16 
17 #include <vrfutil/objectDB.h>
18 
19 #include <boost/scoped_ptr.hpp>
20 
27 {
28 public:
33  explicit DtCutoutCache(
34  const DtFilename& filename,
35  const osgEarth::Profile* profile,
36  bool erasePrevious = false);
37 
39  virtual ~DtCutoutCache();
40 
42  struct Record
43  {
47 
48  Record();
49  };
50 
55  virtual boost::shared_ptr<Record> read(const osgEarth::TileKey& key);
56 
59  virtual void write(
60  const osgEarth::TileKey& key,
61  const DtCollisionObjectList& objects,
62  const DtTileData::Extent::Vector& maskExtents);
63 
64 protected:
65  void fillCache();
66 
68  boost::scoped_ptr<DtObjectDB::Cursor> myCursor;
69 
71 
76 
77  typedef std::map<osgEarth::TileKey, boost::shared_ptr<Record> > CacheMap;
78 
80 };
81 
82 
boost::shared_ptr< DtObjectDB > Ptr
Definition: objectDB.h:30
boost::scoped_ptr< DtObjectDB::Cursor > myCursor
Definition: cutoutCache.h:68
DtTileData::Extent::Vector maskExtents
Definition: cutoutCache.h:46
DtU64 Offset
Definition: objectDB.h:31
DtObjectDB::Offset myNextWriteLocationOffset
offset in the file where we store the offset where the record will be written.
Definition: cutoutCache.h:73
DtObjectDB::Ptr myObjectDB
Definition: cutoutCache.h:67
DtObjectDB::Offset myNextWriteLocation
offset in the file where the next record will be written.
Definition: cutoutCache.h:75
std::vector< Extent > Vector
Definition: tileData.h:48
std::map< osgEarth::TileKey, boost::shared_ptr< Record > > CacheMap
Definition: cutoutCache.h:77
Data for masks in a given tilekey.
Definition: cutoutCache.h:42
Contains DtCutoutCache. Binary db for storing cached osgearth cutouts.
Definition: cutoutCache.h:26
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
std::list< boost::shared_ptr< btCollisionObject > > DtCollisionObjectList
Definition: osgToBullet.h:51
osg::ref_ptr< const osgEarth::Profile > myProfile
Definition: cutoutCache.h:70
DtCollisionObjectList collisionObjects
Definition: cutoutCache.h:44
CacheMap myCacheMap
Definition: cutoutCache.h:79
unsigned numberOfTriangles
Definition: cutoutCache.h:45

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)