VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
asciiReader.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1998 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: asciiTdb.h,v $ $Revision: 1.11 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef asciiReader_H_
10 #define asciiReader_H_
11 
12 #include "ascii/asciiDefines.h"
13 #include "shape/shapeReader.h"
14 #include "geometry/point.h"
15 #include <vlutil/vlUtil.h>
16 
17 class DtList;
18 class DtMetafileRecord;
19 class DtFilename;
20 class DtSurfaceManager;
21 class DtVectorNetwork;
23 
25 class DtAsciiInitializer;
26 
27 
28 // class DtAsciiReader:
29 //
30 // Instances of DtAsciiReader are a list of DtDtedCells.
32 {
33 
34 public:
35 
36  // constructor
37  DtAsciiReader();
38 
39  // destructor
40  virtual ~DtAsciiReader();
41 
42  // Save the database in dted format.
43  virtual bool Save(const DtFilename& name);
44 
45  // Loads terrain database file named filename, returning the data in
46  // terrain. The terrain pointer passed in must be initialized before calling
47  // loadTerrain.
48  virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain);
49 
50  // Loads terrain database file named filename, returning the data in
51  // terrain. The initializer object is used to pass in additional information
52  // about the terrain to be loaded. The terrain pointer passed in must be
53  // initialized before calling loadTerrain.
54  virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain,
55  const DtTerrainInitializer* initializer);
56 
57  // Returns "ascii"
58  virtual const DtString dataType() const;
59 
60  static DtTerrainReader * create();
61 
62  // Returns only the coordinate system that would define this database. Should not load
63  // any polygonal or vector information
64  virtual Coordinate_System* coordinateSystem(const DtFilename& filename);
65 
66 protected:
67 
68  // copy constructor
69  DtAsciiReader(const DtAsciiReader& orig);
70 
71  // assignment operator
73 
74  // Load a dted database (filename is the filename of a terrain metafile).
75  // We need the path to this file in case the dted files specified in the
76  // record are relative paths.
77  virtual bool Load(const DtFilename& filename, const DtAsciiInitializer* i);
78  virtual bool readAsPostedData(const DtFilename& path, const DtAsciiInitializer *i);
79  virtual bool readAsTriangulated(const DtFilename& path, const DtAsciiInitializer *i);
80 
81  virtual int optionalFileFlags(const DtFilename& filename)
82  {
83  return 0;
84  }
85 
86 protected:
87 
88  double myOriginLat;
89  double myOriginLon;
91 };
92 
93 #endif
94 

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)