VR-Forces 5.0.2 Developer's Guide
 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 
static DtTerrainReader * create()
virtual bool Load(const DtFilename &filename, const DtShapeInitializer *i)
virtual const DtString dataType() const
bool mySetOriginFromFile
Definition: asciiReader.h:90
DtShapeReader & operator=(const DtShapeReader &orig)
virtual Coordinate_System * coordinateSystem(const DtFilename &filename)
double myOriginLon
Definition: asciiReader.h:89
virtual int optionalFileFlags(const DtFilename &filename)
Definition: asciiReader.h:81
Definition: coordSystem.h:54
Definition: asciiReader.h:31
Definition: specificationManager.h:31
Definition: surfaceManager.h:30
Definition: terrainReader.h:41
double myOriginLat
Definition: asciiReader.h:88
Definition: shapeReader.h:30
Definition: metafileRecord.h:28
#define DT_DLL_ascii
Definition: asciiDefines.h:23
Definition: terrainInitializer.h:16
Definition: terrainDatabase.h:148
virtual bool loadTerrain(const DtFilename &filename, DtTerrainDatabase *terrain)
Definition: asciiInitializer.h:24
Definition: vectorNetwork.h:37

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)