VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
examples
extentTerrainImplementation
extentTerrainImplementation.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2011 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
//\file extentTerrainImplementation.h
7
//\ingroup terrainInterface
8
9
//\brief
10
11
#pragma once
12
13
#include "
terrainInterface/terrainImplementation.h
"
14
#include "
terrainInterface/terrainCapabilities.h
"
15
16
class
DtCoordinateSystem;
17
namespace
makArchives
18
{
19
class
DtGenericTerrainRecord;
20
}
21
22
//This terrain implementation is an algorithmic representation of the world
23
//as a flat earth extent. All soil types are returned as
24
//the undefined soil type.
25
class
DtExtentTerrainImplementation
:
public
DtTerrainImplementation
26
{
27
public
:
28
29
DtExtentTerrainImplementation
(
DtConsoleCommandManager
* cmdMgr);
30
virtual
~DtExtentTerrainImplementation
();
31
32
//Static creator function
33
static
DtTerrainImplementation
*
create
(
DtConsoleCommandManager
* cmdMgr);
34
35
//Called with the generic terrain record from the mtf file.
36
//Use to setup initial values on terrain load.
37
virtual
bool
loadTerrain
(
const
makArchives::DtGenericTerrainRecord
& record);
38
39
//Returns myCoordinateSystem
40
virtual
const
Coordinate_System
*
coordinateSystem
()
const
;
41
42
//Returns topmost intersection of chord with terrain in record.
43
//irtFlag specifies what intersection
44
//data should be filled in for the record.
45
virtual
bool
chordIntersect
(
const
DtChord
& chord,
46
DtVrfChordIntersectionRecord
& record,
47
DtIntersectionRecord::DtIntersectionType
irtFlag =
48
DtIntersectionRecord::INT_ALL_DATA
,
49
bool
*
dataAvailable
= 0,
bool
overrideBlockingAssert =
false
,
int
flags = 0)
const
;
50
51
//Returns all intersections of chord with terrain. intList is the list of each intersection record.
52
//irtFlag specifies what intersection data should be filled in for the record.
53
//In this example there will only ever be at most 1 intersection.
54
virtual
bool
allIntersectsAlongChord
(
const
DtChord
& chord,
55
DtVrfChordIntersectRecordList
& intList,
56
DtIntersectionRecord::DtIntersectionType
irtFlag =
57
DtIntersectionRecord::INT_ALL_DATA
,
58
bool
*
dataAvailable
= 0,
bool
overrideBlockingAssert =
false
,
int
flags = 0)
const
;
59
60
//Returns the capabilities of the current terrain.
61
virtual
const
DtTerrainCapabilities
*
terrainCapabilities
()
const
;
62
63
//Used by B-HAVE for creating path data. output is an interface to be called
64
//on the triangles in the terrain. box is an extent that determines which
65
//triangles should be considered. finalize is called once all triangles
66
//have been processed.
67
virtual
void
processTrianglesInArea
(
68
DtTriangleOutputInterface
& output,
69
const
DtTerrainProcessPolygonsBox
& box)
const
;
70
71
protected
:
72
73
//Fill in the intersection record based on the result of the intersection
74
//test.
75
void
fillHitRecord
(
DtChordIntersectionRecord
& rec,
76
const
DtChord
& chord,
const
DtPoint
& chordNormal,
double
intersectTime,
77
DtIntersectionRecord::DtIntersectionType
irtFlag)
const
;
78
79
//Function that actually does the chord-extent intersection test.
80
bool
chordExtentIntersect
(
const
DtChord
& chord,
81
DtChordIntersectionRecord
& hit,
82
DtIntersectionRecord::DtIntersectionType
irtFlag)
const
;
83
85
virtual
void
cacheInformationForTerrainArea
(
int
requestId,
int
lowestLOD,
int
highestLOD,
const
DtExtent
& cacheArea,
86
double
& estimatedTime,
double
& estimatedSize, std::vector<std::string>& elevationLayers, std::vector<std::string>& modelLayers)
const
;
87
89
virtual
void
cacheTerrainArea
(
int
requestId,
int
lowestLOD,
int
highestLOD,
const
DtExtent
& cacheArea,
DtCacheProgressCallbackFunction
fcn = 0,
void
* usr = 0);
90
92
virtual
void
cancelCacheTerrainArea
(
int
requestId);
93
94
protected
:
95
Coordinate_System
*
myCoordinateSystem
;
96
DtTerrainCapabilities
myCapabilities
;
97
};
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
)