VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
shapeReader.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: shapeDb.h,v $ $Revision: 1.17 $ $State: Exp $
7 *********************************************************************/
8 #ifndef shapeReader_H_
9 #define shapeReader_H_
10 
11 #include "shape/shapeDefines.h"
12 #include "gdb/gdbTerrainReader.h"
13 #include "geometry/point.h"
14 #include <vlutil/vlUtil.h>
15 #include <vlutil/vlConfig.h>
16 #include <list>
17 
18 class DtMetafileRecord;
19 class DtFilename;
20 class DtSurfaceManager;
21 class DtVectorNetwork;
22 
23 //class DtTerrainInitializer;
24 class DtShapeInitializer;
25 class DtShapeTerrainFile;
26 
27 //
28 // Instances of DtShapeReader are responsible for importing polygonal shapefiles
29 // into the GDB format..
31 {
32 
33 public:
34 
35  typedef std::list<DtShapeTerrainFile*> DtShapeTerrainFileContainer;
36  typedef DtShapeTerrainFileContainer::iterator DtShapeTerrainFileIter;
37  typedef DtShapeTerrainFileContainer::const_iterator DtShapeTerrainFileConstIter;
38 
39  // constructor
40  DtShapeReader();
41 
42  // destructor
43  virtual ~DtShapeReader();
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,
49  DtTerrainDatabase* terrain);
50 
51  // Loads terrain database file named filename, returning the data in
52  // terrain. The initializer object is used to pass in additional information
53  // about the terrain to be loaded. The terrain pointer passed in must be
54  // initialized before calling loadTerrain.
55  virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain,
56  const DtTerrainInitializer* initializer);
57 
58  // Returns "shape"
59  virtual const DtString dataType() const;
60 
61  virtual int surfaceIDByElevation(double z);
62 
63  virtual DtPoint &origin();
64 
65  static DtTerrainReader* create();
66 
67  // Returns only the coordinate system that would define this database. Should not load
68  // any polygonal or vector information
69  virtual Coordinate_System* coordinateSystem(const DtFilename& filename);
70 
71  virtual int optionalFileFlags(const DtFilename& filename)
72  {
73  return 0;
74  }
75 
76 protected:
77 
78  // copy constructor
79  DtShapeReader(const DtShapeReader& orig);
80 
81  // assignment operator
83 
84  // Load a dted database (filename is the filename of a terrain metafile).
85  // We need the path to this file in case the dted files specified in the
86  // record are relative paths.
87  virtual bool Load(const DtFilename& filename, const DtShapeInitializer* i);
88 
89  virtual bool importPolys();
90  virtual bool importPostElevationData(const DtShapeInitializer* i);
91 
92  virtual void clean();
93 
94 protected:
95 
97 
98  double myMaxHigh;
99  double myMinHigh;
100 
101  double myLenHigh;
102 
104 
106 
107  static const unsigned int theNumColorGradations;
108 
109 };
110 
111 #endif

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)