VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCDBVector.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright(c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <osgEarth/Map>
12 
14 
18 
21 #include <osgEarth/MapNodeObserver>
22 #include <osgEarth/Map>
23 #include <Vect/Cee_VectFeature.h>
24 #include <Cee_CdbDB.h>
25 #include <vrvUtil/DtProfiler.h>
26 
27 namespace makVrv { namespace oe { namespace CDB
28 {
29  class DatasetInfo;
30  class CDBTileKey;
31  class CDBTileVerbose;
32  class CDBModelOptions;
33  class CdbGroupNode;
34  class CDBDatasets;
35 
36  #define theINDEXNOTINITIALIZED -1
37 
40  class DtCDBVector : public osg::Referenced
41  {
42  public:
44  DtCDBVector(const DatasetInfo& CurrentDataset, osg::ref_ptr<DtCDBDatabase> cdbDb, const osgDB::Options* dbOptions, const CDBModelOptions* cdbModelOptions);
46  ~DtCDBVector();
47 
49  virtual void initialize(const std::string& shpInstanceFile, const std::string& dbfClassFile, const std::string& dbfExtendedFile) = 0;
51  virtual bool isInitialized() const { return myIsInitialized; };
53  virtual void readInstance(const std::string& dbfClassFile, const CDBTileKey& key, const std::string& shpInstanceFile, VectFile* shpVector,
54  const osgEarth::ElevationQuery& elevationQuery, VecInstancesDbfRow& vecInstanceRow, const CDBTileVerbose& verboseKey,
55  const MapStringToClassDbfRow& classMap, const std::string* datasetCachePath = NULL) = 0;
57  virtual void readClass(const std::string& dbfClassFile, const CDBTileKey& key, const CDBTileVerbose& verboseKey, MapStringToClassDbfRow& classMap) = 0;
59  //virtual void readExtended() = 0;
61  virtual void processFeature(const std::string& dbfClassFile, CdbGroupNode* groupNode, VecInstancesDbfRow& vecInstanceRow, bool& wasModelFound) = 0;
63  bool getModelPoint(const VectFeature* feature, osg::Vec3d& modelPoint);
65  bool isValidName(std::string &filename) const;
67  void setMapNode(osgEarth::MapNode* mapNode) { myMapNode = mapNode; };
68 
69  protected:
71  bool myIsInitialized;
73  osg::ref_ptr< osgEarth::SpatialReference > myWgs84;
75  osg::observer_ptr<osgEarth::MapNode> myMapNode;
81  std::string myShpInstanceFile;
83  std::string myDbfClassFile;
85  std::string myDbfExtendedFile;
87  osg::ref_ptr<DtCDBDatabase> myCdbDatabase;
91  osg::ref_ptr<osgDB::Options> myDbOptions;
94 
96  std::string myFACC;
98  std::string myFSC;
100  std::string myCNAM;
102  unsigned int myCMIX;
103 
112 
115 
118 
119  };
120 }}} // namespace makVrv::oe::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)