![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 #pragma once 00006 #ifndef tdbflt_H_ 00007 #define tdbflt_H_ 00008 00009 #include "flt/mgWrapperInterface.h" 00010 #include "flt/fltDefines.h" 00011 #include "gdb/gdbNode.h" 00012 #include "geometry/gdbColor.h" 00013 #include "gdb/terrainReader.h" 00014 #include "flt/surfCharMap.h" 00015 #include "flt/fltTerrainInit.h" 00016 00017 #include <vlutil/vlConfig.h> 00018 #include <list> 00019 #include <map> 00020 #include <string> 00021 #include "vlutil/vlDynamic.h" 00022 00023 #define API_LEV2 00024 00025 class DtGroup; 00026 00027 class DT_DLL_flt DtFltReader: public DtTerrainReader 00028 { 00029 public: 00030 00031 DtFltReader(); 00032 virtual ~DtFltReader(); 00033 00034 // Loads terrain database file named filename, returning the data in 00035 // terrain. The terrain pointer passed in must be initialized before 00036 // calling loadTerrain. 00037 virtual bool loadTerrain(const DtFilename& filename, 00038 DtTerrainDatabase* terrain); 00039 00040 // Loads terrain database file named filename, returning the data in 00041 // terrain. The initializer object is used to pass in additional information 00042 // about the terrain to be loaded. The terrain pointer passed in must be 00043 // initialized before calling loadTerrain. 00044 virtual bool loadTerrain(const DtFilename& filename, 00045 DtTerrainDatabase* terrain, 00046 const DtTerrainInitializer* initializer); 00047 00048 // Returns "flt" 00049 virtual const DtString dataType() const; 00050 00051 static DtTerrainReader* create(); 00052 00053 // virtual DtSurfaceCharacteristicMap surfaceCharacteristicMap() const; 00054 // virtual void setSurfaceCharacteristicMap(const DtSurfaceCharacteristicMap& newSurfaceCharacteristicMap); 00055 00056 00057 // Load from the given OpenFlight file. This is done by init() (after it 00058 // initializes the mgapi) and then calls xlateOpenFlightFile to do the 00059 // actual translation. Then it "reduces" the database and updates the 00060 // extents. 00061 bool loadFromFile(const DtFilename& filename); 00062 00063 //Appends a an external flight file to the reader's database 00064 void addFlightFile(const DtFilename& filename, DtTerrainDatabase *terrain); 00065 00066 // Returns only the coordinate system that would define this database. Should not load 00067 // any polygonal or vector information 00068 virtual Coordinate_System* coordinateSystem(const DtFilename& filename); 00069 00070 virtual int optionalFileFlags(const DtFilename& filename) 00071 { 00072 return 0; 00073 } 00074 00075 protected: 00076 DtMgWrapperInterface* myMgWrapperInterface; 00077 00078 // Holds possible spheroid information 00079 DtFlightTerrainInitializer myFltInit; 00080 00081 static const DtString theCharacteristicMapName; 00082 }; 00083 00084 #endif