VR-Forces Development_Version 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
humanFollowController.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2003 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
11
12
#pragma once
13
14
#include <
vrfobjcore/singleTaskControllerComponent.h
>
15
#include "
vrfmodel/vrfmodelDefines.h
"
16
#include <vlpi/trigonometricSmoother.h>
17
18
class
DtHumanStateRepository
;
19
class
DtHumanFollowPSR
;
20
class
DtInputPortGroup
;
21
class
DtCollisionInputPort
;
22
class
DtHumanMovementControlOutputPortGroup
;
23
class
DtVectorOutputPort
;
24
class
DtBooleanOutputPort
;
25
class
DtActiveBotNavInterface
;
26
class
DtHumanFollowControllerDescriptor
;
27
36
class
DT_DLL_vrfmodel
DtHumanFollowController
:
public
DtSingleTaskControllerComponent
37
{
38
39
public
:
40
43
DtHumanFollowController
(
const
DtString
& name,
44
DtVrfObject
* owner,
45
DtSimManager
* simManager,
46
DtComponentDescriptor
* desc = 0,
47
DtReaderWriterRegistry
* parentRegistry = 0);
48
50
virtual
~
DtHumanFollowController
();
51
54
virtual
const
char
*
type
()
const
;
55
57
virtual
bool
init
();
58
64
virtual
bool
createPSR();
65
67
virtual
void
tick
();
68
72
static
void
followEntityCallback(
DtSimMessage
* msg,
void
* usrData);
73
74
virtual
void
processFollowEntityTask(
DtSimMessage
* msg);
75
80
virtual
const
DtUUID
& entityToFollow();
81
virtual
void
setEntityToFollow(
const
DtUUID
& entity);
82
85
virtual
const
DtVector
& offsetVector()
const
;
86
virtual
void
setOffsetVector(
const
DtVector
& offsets);
87
91
static
DtSimComponent
* creator(
const
DtString
& name,
92
DtVrfObject
* owner,
93
DtSimManager
* simManager,
94
DtComponentDescriptor
* desc = 0,
95
DtReaderWriterRegistry
* parentRegistry = 0);
96
98
virtual
void
registerTaskMsgCallbacks
();
99
112
virtual
bool
setupDestination();
113
116
virtual
bool
passedDestination();
117
120
virtual
double
findDesiredSpeed();
121
125
virtual
double
findDesiredHeading();
126
130
virtual
void
stop();
131
132
virtual
void
clearTask
();
133
134
protected
:
135
137
DtHumanFollowController
(
const
DtHumanFollowController
&
138
orig);
139
141
const
DtHumanFollowController
&
operator=
(
const
142
DtHumanFollowController
& orig);
143
150
virtual
void
setSmoother(
const
DtVector
& location);
151
158
virtual
DtVector
smoothedLocation();
159
165
virtual
bool
nearDestination();
166
170
virtual
double
distanceToDestination()
const
;
171
177
virtual
DtVector
localDestination()
const
;
178
183
virtual
bool
getDestination(
DtVector
& destination)
const
;
184
185
194
virtual
bool
atDestination();
195
198
virtual
void
doMoving();
199
201
virtual
bool
destinationIsInsideObstruction(
202
const
DtVector
& localDestination)
const
;
203
205
virtual
bool
createPortGroups
();
206
208
virtual
bool
createPorts
();
209
211
virtual
void
moveToDestination();
212
216
virtual
void
computeTopoVectors();
217
219
virtual
bool
usingNavBot();
220
223
virtual
void
moveUsingNavData();
224
225
static
void
navAreaChangedCallback(
void
* usr);
226
virtual
void
processNavAreaChanged();
227
230
virtual
bool
needToUpdateNavInterfaceDestination(
const
DtVector
& newLocalDestination);
231
237
virtual
DtVector
predictedDestination();
238
239
virtual
void
updateTaskVisualizations
();
240
241
protected
:
242
244
DtVrfObject
*
myEntityToFollow
;
245
247
DtHumanStateRepository
*
myHumanStateRepository
;
248
251
DtHumanFollowPSR
*
myProcessState
;
252
255
261
DtCollisionInputPort
*
myCollisionAvoidancePort
;
262
265
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
266
268
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
269
275
DtVectorOutputPort
*
myDestinationOutputPort
;
276
282
DtBooleanOutputPort
*
myIsMovingPort
;
283
285
289
DtVector
myLocalDestination
;
290
293
DtVector
myWorldDestination
;
294
297
DtVector
myLocalDestinationMove
;
299
DtVector
myTopoDestinationMoveUnit2D
;
300
302
DtVector
myTopoDestinationToEntity2D
;
303
308
DtVector
myPredictedDestination
;
309
313
DtVector
myStationLocation
;
314
318
DtVector
myLookAheadStationLocation
;
319
323
bool
myNearDestination
;
324
bool
myPassedDestination
;
325
bool
myAtDestination
;
326
double
myDistanceSquared
;
327
bool
myDestinationIsInsideObstruction
;
328
double
myCurrentSpeed
;
330
334
double
myAtDistanceSquared
;
335
339
double
myNearDistanceSquared
;
340
347
double
myFarCatchUpFactor
;
348
359
bool
myIgnoreNavData
;
360
361
DtVector
myTransitionPoint
;
362
363
DtActiveBotNavInterface
*
myNavInterface
;
364
DtVector
myNavInterfaceCurrentDestination
;
365
double
myNavInterfaceDestinationSetTime
;
366
367
DtHumanFollowControllerDescriptor
*
myComponentDescriptor
;
368
369
DtTrigonometricSmoother*
myLeaderSmoother
;
370
371
};
372
373
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)