VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
gdb
extentReader.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2005 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: extentReader.h,v $ $Revision: 1.5 $ $State: Exp $
7
******************************************************************************/
8
#ifndef extentReader_H_
9
#define extentReader_H_
10
11
//
12
// \file extentReader.h
13
// \brief Contains the DtExtentReader class declaration.
14
//
15
16
#include "
gdb/gdbDefines.h
"
17
#include "
gdb/terrainReader.h
"
18
19
class
DtExtentInitializer
;
20
class
DtTerrainInitializer
;
21
class
DtTerrainDatabase
;
22
class
DtFilename;
23
24
25
//
26
// The DtExtentReader class is responsible for creating a simple terrain with
27
// the coordinate system and extent specified in the initializer. Note that
28
// the default is to create a geodetic terrain with the maximum extents defined
29
// for the initializer.
30
class
DT_DLL_gdb
DtExtentReader
:
public
DtTerrainReader
31
{
32
public
:
33
DtExtentReader
();
34
35
virtual
~
DtExtentReader
();
36
37
private
:
38
// Copy constructor and Assignment operator not implemented. This class is
39
// not copyable or assignable
40
DtExtentReader
(
const
DtExtentReader
& original);
41
const
DtExtentReader
&
operator=
(
const
DtExtentReader
& original);
42
43
public
:
44
// Loads terrain database file named filename, returning the data in
45
// terrain. The terrain pointer passed in must be initialized before calling
46
// loadTerrain.
47
virtual
bool
loadTerrain
(
const
DtFilename& filename,
DtTerrainDatabase
* terrain);
48
49
// Loads terrain database file named filename, returning the data in
50
// terrain. The initializer object is used to pass in additional information
51
// about the terrain to be loaded. The terrain pointer passed in must be
52
// initialized before calling loadTerrain.
53
virtual
bool
loadTerrain
(
const
DtFilename& filename,
DtTerrainDatabase
* terrain,
54
const
DtTerrainInitializer
* initializer);
55
56
bool
loadTerrain
(
DtTerrainDatabase
& terrainDb,
57
const
DtExtentInitializer
& extentInitializer);
58
59
bool
createCoordinateSystem(
DtTerrainDatabase
& terrainDb,
60
const
DtExtentInitializer
& extentInitializer);
61
62
// Creates two terrain triangles formed from the specified extent. The
63
// altitude of the vertices is determined by the altitude of the left, back,
64
// bottom vertex and the right, front, upper vertex. These are used as the
65
// SW and NE vertices respectively. The altitude of the SE vertex matches
66
// the altitude of the SW vertex and the altitude of the NW vertex equals the
67
// altitude of the NE vertex.
68
//
69
// (NW) *----------* (NE)
70
// |\ |
71
// | \ |
72
// | \ |
73
// | \ |
74
// | \ |
75
// | \ |
76
// | \ |
77
// | \ |
78
// | \ |
79
// | \|
80
// (SW) *----------* (SE)
81
//
82
bool
createTerrain(
DtTerrainDatabase
& terrainDb,
83
const
DtExtentInitializer
& extentInitializer);
84
85
// Returns "extent"
86
virtual
const
DtString
dataType
()
const
;
87
88
// Returns only the coordinate system that would define this database. Should not load
89
// any polygonal or vector information
90
virtual
Coordinate_System
*
coordinateSystem
(
const
DtFilename& filename);
91
92
static
DtTerrainReader
* create();
93
94
virtual
int
optionalFileFlags
(
const
DtFilename& filename)
95
{
96
return
0;
97
}
98
99
protected
:
100
bool
testInvariant()
const
;
101
102
private
:
103
};
104
105
inline
const
DtString
DtExtentReader::dataType
()
const
106
{
107
return
"extent"
;
108
}
109
110
111
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)