VR-Forces 4.7 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 
84  osg::ref_ptr<osgDB::Options> myDbOptions;
85 
87  std::string myCdbRootDir;
88 
91 
93  osg::ref_ptr<CDBTileCache> myTileCache;
94 
97 
100 
103 
106 
109 
112 
115 
117  osg::ref_ptr<DtCDBBaseMaterialTable> myProceduralBaseMaterialTable;
118 
119  };
120 
121 } } } // namespace mak::osgEarth::CDB

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)