VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
shape
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..
30
class
DT_DLL_shape
DtShapeReader
:
public
DtTerrainReader
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
82
DtShapeReader
&
operator=
(
const
DtShapeReader
& orig);
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
96
double
myThresholdForSeaLevel
;
97
98
double
myMaxHigh
;
99
double
myMinHigh
;
100
101
double
myLenHigh
;
102
103
DtShapeTerrainFileContainer
myFileContainer
;
104
105
DtPoint
myOriginToSubstract
;
106
107
static
const
unsigned
int
theNumColorGradations
;
108
109
};
110
111
#endif
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)