VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCDBTileSource.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include "DtCDBOptions.h"
12 #include <osgEarth/TileSource>
13 #include <osgEarth/ImageMosaic>
18 #include <Cee_CdbDB.h>
19 
20 namespace makVrv { namespace oe { namespace CDB
21 {
22  using namespace osgEarth;
23 
24  class DtCDBBaseMaterialTable;
25 
29  class CdbImageMosaic : public ImageMosaic
30  {
31  public:
33  virtual ~CdbImageMosaic() {};
34 
35  virtual osg::Image* createImage(bool isRasterMaterial);
36  };
37 
42  class CDBTileSource : public TileSource
43  {
44  public:
45 
47  CDBTileSource(const TileSourceOptions& options);
48 
50  Status initialize(const osgDB::Options* dbOptions);
51 
53  osg::Image* createImage(const TileKey& key, ProgressCallback* progress);
54 
56  osg::HeightField* createHeightField(const TileKey& key, ProgressCallback* progress);
57 
58  protected:
59 
61  virtual ~CDBTileSource();
62 
63  private:
64 
66  void processCDBImageryTileSource(const TileKey& key, const std::string& CdbTile, const int st, const TileKey& cdbKey, const std::vector<TileKey>::iterator& k, CdbImageMosaic& mosaic, bool& foundAtLeastOneRealTile, bool& addedImage);
67 
69  void processCDBRasterMaterialTileSource(const TileKey& key, const std::string& CdbTile, const std::string& CdbMaterialDescriptorTile, const int st, const TileKey& cdbKey, const std::vector<TileKey>::iterator& k, CdbImageMosaic& mosaic, bool& foundAtLeastOneRealTile, bool& addedImage);
70 
72  ReadResult readImage(const std::string& cdbfile);
73 
75  osg::ref_ptr<osg::HeightField> readElevation(const std::string& cdbfile);
76 
78  bool convertToSplat( osg::Image* rasterImage, const std::string& CdbMaterialDescriptorTile);
79 
82 
85 
87  std::string myCdbRootDir;
88 
91 
94 
97 
100 
103 
106 
109 
112 
115 
118 
119  };
120 
121 } } } // namespace mak::osgEarth::CDB
CDB raster earth file options for &quot;cdbraster&quot; driver.
std::string myCdbRootDir
CDB root folder from the .earth file.
Definition: DtCDBTileSource.h:87
OpenThreads::Mutex myImageryMutex
Whole cache mutex object to allow thread safety.
Definition: DtCDBTileSource.h:108
CDB Class that hold the Dataset informationNote: A DUPLICATED class also exist in the Openflight Plug...
Definition: featureContext.h:37
Class the parse CDB folder before loading it to speed up the actual reading later.
Utility class to get CDB dataset information.
osg::ref_ptr< DtCDBBaseMaterialTable > myProceduralBaseMaterialTable
Base Material table use to map Procedural class index.
Definition: DtCDBTileSource.h:117
osg::ref_ptr< osgDB::Options > myDbOptions
Reference pointer to the OSG DB options.
Definition: DtCDBTileSource.h:84
virtual ~CdbImageMosaic()
Definition: DtCDBTileSource.h:33
Class used to find CDB Tiles information.
Definition: DtCDBTile.h:52
CDB Dataset information class.
Definition: DtCDBDatasetInfo.h:23
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
CDBDatasets * myDatasetsPtr
Dataset Manager singleton.
Definition: DtCDBTileSource.h:99
Class used to create OSG Tiles from CDB Tiles Used to create OSG imagery, land use or elevation tiles...
Definition: DtCDBTileSource.h:42
Used to pass option(s) Pass option from the OSG earth file to this &quot;cdbraster&quot; driver.
Definition: DtCDBOptions.h:22
CdbDB myCdbDatabase
CDB database object.
Definition: DtCDBTileSource.h:102
CdbImageMosaic()
Definition: DtCDBTileSource.h:32
functions class that help find CDB tiles information
bool myCdbIsOpened
Was the CDB database open correctly.
Definition: DtCDBTileSource.h:105
OpenThreads::Mutex myRasterMaterialMutex
Whole cache mutex object to allow thread safety.
Definition: DtCDBTileSource.h:114
CDBTile * myCdbTilePtr
CDB Tile utility object.
Definition: DtCDBTileSource.h:96
Utility class for extracting a single image from a collection of image tiles.
Definition: DtCDBTileSource.h:29
DatasetInfo myCurrentDataset
Current CDB Dataset of this pager.
Definition: DtCDBTileSource.h:90
OpenThreads::Mutex myElevationMutex
Mutex object to allow thread safety.
Definition: DtCDBTileSource.h:111
osg::ref_ptr< CDBTileCache > myTileCache
CDB Tile cache object.
Definition: DtCDBTileSource.h:93
CDB Dataset class.
Definition: DtCDBDatasets.h:78
const CDBOptions myCdbOptions
Earth file CDB options.
Definition: DtCDBTileSource.h:81

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)