VR-Forces 4.7 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
//data should be filled in for the record.
44
virtual
bool
chordIntersect
(
DtTerrainIntersectStatus
& status,
45
const
DtChord
& chord,
46
DtVrfChordIntersectionRecord
& record,
47
const
DtTerrainIntersectOptions
& options)
const
;
48
49
//Returns all intersections of chord with terrain. intList is the list of each intersection record.
50
//In this example there will only ever be at most 1 intersection.
51
virtual
bool
allIntersectsAlongChord
(
DtTerrainIntersectStatus
& status,
52
const
DtChord
& chord,
53
DtVrfChordIntersectRecordList
& intList,
54
const
DtTerrainIntersectOptions
& options)
const
;
55
56
//Returns the capabilities of the current terrain.
57
virtual
const
DtTerrainCapabilities
*
terrainCapabilities
()
const
;
58
59
//Used by B-HAVE for creating path data. output is an interface to be called
60
//on the triangles in the terrain. box is an extent that determines which
61
//triangles should be considered. finalize is called once all triangles
62
//have been processed.
63
virtual
void
processTrianglesInArea
(
64
DtTriangleOutputInterface
& output,
65
const
DtTerrainProcessPolygonsBox
& box)
const
;
66
67
protected
:
68
69
//Fill in the intersection record based on the result of the intersection
70
//test.
71
void
fillHitRecord
(
DtChordIntersectionRecord
& rec,
72
const
DtChord
& chord,
const
DtPoint
& chordNormal,
double
intersectTime,
73
DtIntersectionRecord::DtIntersectionType
irtFlag)
const
;
74
75
//Function that actually does the chord-extent intersection test.
76
bool
chordExtentIntersect
(
const
DtChord
& chord,
77
DtChordIntersectionRecord
& hit,
78
DtIntersectionRecord::DtIntersectionType
irtFlag)
const
;
79
81
virtual
void
cacheInformationForTerrainArea
(
int
requestId,
int
lowestLOD,
int
highestLOD,
const
DtExtent
& cacheArea,
82
double
& estimatedTime,
double
& estimatedSize, std::vector<std::string>& elevationLayers, std::vector<std::string>& modelLayers)
const
;
83
85
virtual
void
cacheTerrainArea
(
int
requestId,
int
lowestLOD,
int
highestLOD,
const
DtExtent
& cacheArea,
DtCacheProgressCallbackFunction
fcn = 0,
void
* usr = 0);
86
88
virtual
void
cancelCacheTerrainArea
(
int
requestId);
89
90
protected
:
91
Coordinate_System
*
myCoordinateSystem
;
92
DtTerrainCapabilities
myCapabilities
;
93
};
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)