VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfutil
scriptGeometry.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
#pragma once
6
7
#include <
vrfutil/vrfutilDefines.h
>
8
#include <matrix/vlVector.h>
9
#include <
vrfutil/asciiSerializable.h
>
10
#include <matrix/geodCoord.h>
11
16
17
class
DtVectorGeoc3D
;
18
class
DtVector3D
;
19
class
DtVectorOffset3D
;
20
22
class
DT_DLL_vrfutil
DtLocation3D
:
public
DtAsciiSerializable
23
{
24
public
:
27
30
DtLocation3D
(
const
DtVector
&vect);
31
DtLocation3D
(
const
DtLocation3D
& orig);
32
DtLocation3D
();
33
~
DtLocation3D
();
34
DtLocation3D
& operator=(
const
DtLocation3D
& orig);
35
37
DtLocation3D
(
const
double
latitude,
const
double
longitude,
38
const
double
altitudeMSL);
39
43
DtLocation3D
makeCopy()
const
;
44
45
//-------------------------------------------
48
50
DtString
objectType
()
const
;
51
53
DtString
serialize
();
54
57
bool
deserialize
(
const
DtString
& data);
58
60
static
DtAsciiSerializable
* creator();
62
//--------------------------------------------
63
68
DtVector
getGeocentric()
const
;
69
DtGeodeticCoord geodLocation()
const
;
70
74
double
getLat()
const
;
75
void
setLat(
const
double
lat);
76
double
getLon()
const
;
77
void
setLon(
const
double
lon);
78
double
getAlt()
const
;
79
void
setAlt(
const
double
alt);
81
83
double
distanceToLocation3D(
const
DtLocation3D
&location)
const
;
84
85
bool
isNearLocation3D(
const
DtLocation3D
&loc,
const
double
error
)
const
;
86
90
bool
isInsidePolygon(
const
std::vector<DtLocation3D> polyPoints)
const
;
91
95
bool
isLeftOfLine(
const
DtLocation3D
&loc1,
const
DtLocation3D
& loc2)
const
;
96
100
105
DtVector3D
vectorToLoc3D(
const
DtLocation3D
&location)
const
;
106
108
DtVectorGeoc3D
vectorGeocToLoc3D(
const
DtLocation3D
&location)
const
;
109
111
DtLocation3D
addVector3D(
const
DtVector3D
&vec)
const
;
112
115
DtLocation3D
addVectorGeoc3D(
const
DtVectorGeoc3D
&vec)
const
;
116
protected
:
120
DtGeodeticCoord
myGeodLocation
;
121
};
122
123
DT_DLL_vrfutil
std::ostream&
operator<<
(std::ostream& stream,
const
DtLocation3D
& loc);
124
130
class
DT_DLL_vrfutil
DtVector3D
:
public
DtAsciiSerializable
131
{
132
public
:
135
137
DtVector3D
();
138
DtVector3D
(
const
DtVector
&vect);
139
DtVector3D
(
const
DtVector3D
&vect);
140
~
DtVector3D
();
141
DtVector3D
& operator=(
const
DtVector3D
& orig);
142
DtVector
nedVector()
const
;
143
145
DtVector3D
(
const
double
north,
const
double
east,
const
double
down);
146
150
DtVector3D
makeCopy()
const
;
151
152
//-------------------------------------------
155
157
DtString
objectType
()
const
;
158
160
DtString
serialize
();
161
164
bool
deserialize
(
const
DtString
& data);
165
167
static
DtAsciiSerializable
* creator();
169
//--------------------------------------------
170
172
void
setNorthEastDown(
const
double
north,
const
double
east,
173
const
double
down);
177
void
setBearingInclRange(
const
double
bearing,
const
double
inclination,
178
const
double
range);
179
184
double
getBearing(
void
)
const
;
186
double
getInclination(
void
)
const
;
188
double
getRange(
void
)
const
;
190
191
double
getNorth(
void
)
const
;
193
double
getEast(
void
)
const
;
195
double
getDown(
void
)
const
;
198
201
DtVector3D
getScaled(
const
double
scale)
const
;
202
DtVector3D
getNegated(
void
)
const
;
203
DtVector3D
getUnit(
void
)
const
;
204
206
DtVector3D
addVector3D(
const
DtVector3D
&vec)
const
;
207
209
DtVector3D
crossVector3D(
const
DtVector3D
&vec)
const
;
210
212
double
dotVector3D(
const
DtVector3D
&vec)
const
;
213
217
DtVector3D
addOffset(
const
DtVectorOffset3D
& offset)
const
;
218
222
double
headingDiff(
const
DtVector3D
&vec)
const
;
223
226
DtVectorGeoc3D
makeVectorGeoc3DAtLoc(
const
DtLocation3D
&loc)
const
;
227
228
protected
:
230
DtVector
myNEDVector
;
231
};
232
233
DT_DLL_vrfutil
std::ostream&
operator<<
(std::ostream& stream,
const
DtVector3D
& vec);
234
238
class
DT_DLL_vrfutil
DtVectorGeoc3D
:
public
DtAsciiSerializable
239
{
240
public
:
241
DtVectorGeoc3D
(
const
DtVector
&vect);
242
DtVectorGeoc3D
(
const
DtVectorGeoc3D
& orig);
243
~
DtVectorGeoc3D
();
244
DtVectorGeoc3D
& operator=(
const
DtVectorGeoc3D
& orig);
245
246
DtVector
geocVector()
const
;
247
248
//-------------------------------------------
251
253
DtString
objectType
()
const
;
254
256
DtString
serialize
();
257
260
bool
deserialize
(
const
DtString
& data);
261
263
static
DtAsciiSerializable
* creator();
265
//--------------------------------------------
266
270
DtVectorGeoc3D
makeCopy()
const
;
271
274
DtVector3D
makeVector3DAtLoc(
const
DtLocation3D
loc)
const
;
275
278
DtVectorGeoc3D
getScaled(
const
double
scale)
const
;
279
DtVectorGeoc3D
getNegated(
void
)
const
;
280
DtVectorGeoc3D
getUnit(
void
)
const
;
282
284
DtVectorGeoc3D
crossVectorGeoc3D(
const
DtVectorGeoc3D
&vec)
const
;
285
287
double
dotVectorGeoc3D(
const
DtVectorGeoc3D
&vec)
const
;
288
289
291
double
getLength()
const
;
292
293
protected
:
294
DtVector
myGeocVector
;
295
};
296
297
DT_DLL_vrfutil
std::ostream&
operator<<
(std::ostream& stream,
const
DtVectorGeoc3D
& vec);
305
306
class
DT_DLL_vrfutil
DtVectorOffset3D
:
public
DtAsciiSerializable
307
{
308
public
:
309
DtVectorOffset3D
();
310
DtVectorOffset3D
(
const
DtVector
&vect);
311
DtVectorOffset3D
(
const
DtVectorOffset3D
&orig);
312
~
DtVectorOffset3D
();
313
DtVectorOffset3D
& operator=(
const
DtVectorOffset3D
& orig);
314
316
DtVectorOffset3D
(
double
right,
double
forward,
double
up);
317
321
DtVectorOffset3D
makeCopy()
const
;
322
323
//-------------------------------------------
326
328
DtString
objectType
()
const
;
329
331
DtString
serialize
();
332
335
bool
deserialize
(
const
DtString
& data);
336
338
static
DtAsciiSerializable
* creator();
340
//--------------------------------------------
341
344
double
getRight(
void
)
const
;
345
void
setRight(
const
double
right);
346
double
getForward(
void
)
const
;
347
void
setForward(
const
double
forward);
348
double
getUp(
void
)
const
;
349
void
setUp(
const
double
up);
351
354
DtVectorOffset3D
getScaled(
const
double
scale)
const
;
355
DtVectorOffset3D
getNegated(
void
)
const
;
356
DtVectorOffset3D
getUnit(
void
)
const
;
358
360
DtVectorOffset3D
addOffset(
const
DtVectorOffset3D
offset)
const
;
361
363
DtVectorOffset3D
crossVectorOffset3D(
const
DtVectorOffset3D
&vec)
const
;
364
366
double
dotVectorOffset3D(
const
DtVectorOffset3D
&vec)
const
;
367
371
DtVector3D
makeVectorRefToDirection(
const
DtVector3D
dirVect)
const
;
372
373
DtVector
vector()
const
;
374
protected
:
376
DtVector
myVector
;
377
};
378
379
DT_DLL_vrfutil
std::ostream&
operator<<
(std::ostream& stream,
const
DtVectorOffset3D
& vec);
380
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)