VR-Forces 4.3.1 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
vrfmodel
groundMoveToDestinationControllerComponent.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
11
12
13
#pragma once
14
15
16
#include "
vrfmodel/groundAutoControllerComponent.h
"
17
#include <matrix/vlVector.h>
18
#include "
vrfobjcore/automotivePSR.h
"
19
20
class
DtString
;
21
class
DtSimManager
;
22
class
DtSimMessage
;
23
class
DtGroundMoveToDescriptor
;
24
class
DtRangeAndDirectionNetworkSegmentMetric;
25
class
DtCollisionInputPort
;
26
class
DtInputPortGroup
;
27
36
#include "
vrfmodel/vrfmodelDefines.h
"
37
class
DT_DLL_vrfmodel
DtGroundMoveToDestinationControllerComponent
:
public
DtGroundAutoControllerComponent
38
{
39
public
:
40
43
DtGroundMoveToDestinationControllerComponent
(
const
DtString
& name,
44
DtVrfObject
* owner,
45
DtSimManager
* simManager,
46
DtComponentDescriptor
* desc = 0,
47
DtReaderWriterRegistry
* parentRegistry = 0);
48
50
virtual
~
DtGroundMoveToDestinationControllerComponent
();
51
53
virtual
bool
init
();
54
57
virtual
void
setComponentDescriptor
(
DtComponentDescriptor
*componentDescriptor);
58
64
virtual
void
tick
();
65
68
virtual
DtString
type
()
const
;
69
71
static
void
setLocationCallback(
DtSimMessage
* msg,
void
* usr);
74
virtual
void
processSetLocation(
DtSimMessage
* msg);
75
77
static
void
modifyVrfObjectCallback(
DtSimMessage
* msg,
void
* usr);
81
virtual
void
processModifyVrfObject(
DtSimMessage
* msg);
82
86
static
DtSimComponent
* creator(
const
DtString
& name,
87
DtVrfObject
* owner,
88
DtSimManager
* simManager,
89
DtComponentDescriptor
* desc = 0,
90
DtReaderWriterRegistry
* parentRegistry = 0);
91
93
virtual
void
registerTaskMsgCallbacks
();
94
103
virtual
bool
getDestination(
DtVector
& destination);
104
109
virtual
const
DtVector
& destinationVector()
const
;
110
117
virtual
double
findDesiredSpeed();
118
127
virtual
double
findDesiredHeading();
128
135
virtual
DtAutoTransmissionGearEnum
determineGearSetting();
136
147
virtual
bool
nearDestination();
148
157
virtual
bool
atDestination();
158
168
virtual
bool
passedDestination();
169
171
virtual
void
stop();
172
175
virtual
void
doMoving();
176
177
protected
:
181
virtual
bool
setupDestination();
182
191
virtual
void
setupDestinationVector()
const
;
192
194
virtual
void
invalidateDestinationVector()
const
;
195
197
virtual
double
desiredHeadingFromDestination(
const
DtDcm& localToTopoDcm);
198
200
virtual
void
moveToDestination();
201
virtual
double
distanceToDestination()
const
;
202
206
virtual
bool
decideToGiveUpTask
()
const
;
207
208
virtual
bool
createPortGroups
();
209
virtual
bool
createPorts
();
210
213
virtual
void
setDestinationIsInsideObstruction(
bool
yesNo);
214
217
virtual
bool
destinationIsInsideObstruction()
const
;
218
219
private
:
222
DtGroundMoveToDestinationControllerComponent
();
223
225
DtGroundMoveToDestinationControllerComponent
(
const
DtGroundMoveToDestinationControllerComponent
&orig);
226
228
const
DtGroundMoveToDestinationControllerComponent
&
operator=
(
const
229
DtGroundMoveToDestinationControllerComponent
& orig);
230
231
protected
:
232
233
double
myDistanceSquared
;
234
235
DtVector
myLocalDestination
;
236
DtVector
myWorldDestination
;
237
238
mutable
DtVector
myDestinationVector
;
239
mutable
bool
myDestinationVectorIsValid
;
240
241
double
myDesiredSpeed
;
242
double
myCurrentSpeed
;
243
244
bool
myAtDestination
;
245
bool
myNearDestination
;
246
bool
myPassedDestination
;
247
248
const
DtGroundMoveToDescriptor
*
myMoveToDescriptor
;
249
252
258
DtCollisionInputPort
*
myCollisionAvoidancePort
;
259
262
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
263
265
266
bool
myDestinationIsInsideObstruction
;
267
};
268
269
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)