VR-Forces 5.0.2 Developer's Guide
 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) 2020 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 #include <set>
20 
21 namespace makVrv { namespace oe { namespace CDB
22 {
23  using namespace osgEarth;
24 
25  class DtCDBBaseMaterialTable;
26 
30  class CdbImageMosaic : public ImageMosaic
31  {
32  public:
34  virtual ~CdbImageMosaic() {};
35 
36  virtual osg::Image* createImage(bool isRasterMaterial);
37  };
38 
43  class CDBTileSource : public TileSource
44  {
45  public:
46 
48  CDBTileSource(const TileSourceOptions& options);
49 
51  Status initialize(const osgDB::Options* dbOptions);
52 
54  osg::Image* createImage(const TileKey& key, ProgressCallback* progress);
55 
57  osg::HeightField* createHeightField(const TileKey& key, ProgressCallback* progress);
58 
59  protected:
60 
62  virtual ~CDBTileSource();
63 
64  private:
65 
67  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);
68 
70  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);
71 
73  ReadResult readImage(const std::string& cdbfile);
74 
76  osg::ref_ptr<osg::HeightField> readElevation(const std::string& cdbfile);
77 
79  bool convertToSplat( osg::Image* rasterImage, const std::string& CdbMaterialDescriptorTile);
81  std::set<unsigned char> myCompMaterialNotFound;
82 
85 
88 
90  std::string myCdbRootDir;
91 
94 
97 
100 
103 
106 
109 
112 
115 
118 
121 
122  };
123 
124 } } } // 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:90
std::set< unsigned char > myCompMaterialNotFound
keep the warning message list so we don&#39;t flood the console
Definition: DtCDBTileSource.h:81
OpenThreads::Mutex myImageryMutex
Whole cache mutex object to allow thread safety.
Definition: DtCDBTileSource.h:111
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:120
osg::ref_ptr< osgDB::Options > myDbOptions
Reference pointer to the OSG DB options.
Definition: DtCDBTileSource.h:87
virtual ~CdbImageMosaic()
Definition: DtCDBTileSource.h:34
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:102
Class used to create OSG Tiles from CDB Tiles Used to create OSG imagery, land use or elevation tiles...
Definition: DtCDBTileSource.h:43
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:105
CdbImageMosaic()
Definition: DtCDBTileSource.h:33
functions class that help find CDB tiles information
bool myCdbIsOpened
Was the CDB database open correctly.
Definition: DtCDBTileSource.h:108
OpenThreads::Mutex myRasterMaterialMutex
Whole cache mutex object to allow thread safety.
Definition: DtCDBTileSource.h:117
CDBTile * myCdbTilePtr
CDB Tile utility object.
Definition: DtCDBTileSource.h:99
Utility class for extracting a single image from a collection of image tiles.
Definition: DtCDBTileSource.h:30
DatasetInfo myCurrentDataset
Current CDB Dataset of this pager.
Definition: DtCDBTileSource.h:93
OpenThreads::Mutex myElevationMutex
Mutex object to allow thread safety.
Definition: DtCDBTileSource.h:114
osg::ref_ptr< CDBTileCache > myTileCache
CDB Tile cache object.
Definition: DtCDBTileSource.h:96
CDB Dataset class. Hold Dataset information Helper class to retreive CBD Dataset information.
Definition: DtCDBDatasets.h:78
const CDBOptions myCdbOptions
Earth file CDB options.
Definition: DtCDBTileSource.h:84

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)