![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1998 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: asciiTdb.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef asciiTdb_H_ 00010 #define asciiTdb_H_ 00011 00012 #include "ascii/asciiDefines.h" 00013 #include "shape/shapeDb.h" 00014 #include "geometry/point.h" 00015 #include <vlutil/vlUtil.h> 00016 00017 class DtList; 00018 class DtMetafileRecord; 00019 class DtFilename; 00020 class DtSurfaceManager; 00021 class DtVectorNetwork; 00022 class DtSpecificationManager; 00023 00024 class DtTerrainInitializer; 00025 class DtAsciiInitializer; 00026 00027 00028 // class DtAsciiReader: 00029 // 00030 // Instances of DtAsciiReader are a list of DtDtedCells. 00031 class DT_DLL_ascii DtAsciiReader : public DtShapeReader 00032 { 00033 00034 public: 00035 00036 // constructor 00037 DtAsciiReader(); 00038 00039 // destructor 00040 virtual ~DtAsciiReader(); 00041 00042 // Save the database in dted format. 00043 virtual bool Save(const DtFilename& name); 00044 00045 // Loads terrain database file named filename, returning the data in 00046 // terrain. The terrain pointer passed in must be initialized before calling 00047 // loadTerrain. 00048 virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain); 00049 00050 // Loads terrain database file named filename, returning the data in 00051 // terrain. The initializer object is used to pass in additional information 00052 // about the terrain to be loaded. The terrain pointer passed in must be 00053 // initialized before calling loadTerrain. 00054 virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain, 00055 const DtTerrainInitializer* initializer); 00056 00057 // Returns "ascii" 00058 virtual const DtString dataType() const; 00059 00060 static DtTerrainReader * create(); 00061 00062 // Returns only the coordinate system that would define this database. Should not load 00063 // any polygonal or vector information 00064 virtual Coordinate_System* coordinateSystem(const DtFilename& filename); 00065 00066 protected: 00067 00068 // copy constructor 00069 DtAsciiReader(const DtAsciiReader& orig); 00070 00071 // assignment operator 00072 DtAsciiReader& operator=(const DtAsciiReader& orig); 00073 00074 // Load a dted database (filename is the filename of a terrain metafile). 00075 // We need the path to this file in case the dted files specified in the 00076 // record are relative paths. 00077 virtual bool Load(const DtFilename& filename, const DtAsciiInitializer* i); 00078 virtual bool readAsPostedData(const DtFilename& path, const DtAsciiInitializer *i); 00079 virtual bool readAsTriangulated(const DtFilename& path, const DtAsciiInitializer *i); 00080 00081 virtual int optionalFileFlags(const DtFilename& filename) 00082 { 00083 return 0; 00084 } 00085 00086 protected: 00087 00088 double myOriginLat; 00089 double myOriginLon; 00090 bool mySetOriginFromFile; 00091 }; 00092 00093 #endif 00094