VR-Forces 4.6.1 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
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
class
DtObjectIdOutputPort
;
28
37
class
DT_DLL_vrfmodel
DtHumanFollowController
:
public
DtSingleTaskControllerComponent
38
{
39
40
public
:
41
44
DtHumanFollowController
(
const
DtString
& name,
45
DtVrfObject
* owner,
46
DtSimManager
* simManager,
47
DtComponentDescriptor
* desc = 0,
48
DtReaderWriterRegistry
* parentRegistry = 0);
49
51
virtual
~
DtHumanFollowController
();
52
55
virtual
const
char
*
type
()
const
;
56
58
virtual
bool
init
();
59
65
virtual
bool
createPSR();
66
68
virtual
void
tick
();
69
73
static
void
followEntityCallback(
DtSimMessage
* msg,
void
* usrData);
74
75
virtual
void
processFollowEntityTask(
DtSimMessage
* msg);
76
81
virtual
const
DtUUID
& entityToFollow();
82
virtual
void
setEntityToFollow(
const
DtUUID
& entity);
83
86
virtual
const
DtVector
& offsetVector()
const
;
87
virtual
void
setOffsetVector(
const
DtVector
& offsets);
88
92
static
DtSimComponent
* creator(
const
DtString
& name,
93
DtVrfObject
* owner,
94
DtSimManager
* simManager,
95
DtComponentDescriptor
* desc = 0,
96
DtReaderWriterRegistry
* parentRegistry = 0);
97
99
virtual
void
registerTaskMsgCallbacks
();
100
113
virtual
bool
setupDestination();
114
117
virtual
bool
passedDestination();
118
121
virtual
double
findDesiredSpeed();
122
126
virtual
double
findDesiredHeading();
127
131
virtual
void
stop();
132
133
virtual
void
clearTask
();
134
135
protected
:
136
138
DtHumanFollowController
(
const
DtHumanFollowController
&
139
orig);
140
142
const
DtHumanFollowController
&
operator=
(
const
143
DtHumanFollowController
& orig);
144
151
virtual
void
setSmoother(
const
DtVector
& location);
152
159
virtual
DtVector
smoothedLocation();
160
166
virtual
bool
nearDestination();
167
171
virtual
double
distanceToDestination()
const
;
172
178
virtual
DtVector
localDestination()
const
;
179
184
virtual
bool
getDestination(
DtVector
& destination)
const
;
185
186
195
virtual
bool
atDestination();
196
199
virtual
void
doMoving();
200
202
virtual
bool
destinationIsInsideObstruction(
203
const
DtVector
& localDestination)
const
;
204
206
virtual
bool
createPortGroups
();
207
209
virtual
bool
createPorts
();
210
212
virtual
void
moveToDestination();
213
217
virtual
void
computeTopoVectors();
218
220
virtual
bool
usingNavBot();
221
224
virtual
void
moveUsingNavData();
225
226
static
void
navAreaChangedCallback(
void
* usr);
227
virtual
void
processNavAreaChanged();
228
231
virtual
bool
needToUpdateNavInterfaceDestination(
const
DtVector
& newLocalDestination);
232
238
virtual
DtVector
predictedDestination();
239
240
virtual
void
updateTaskVisualizations
();
241
242
static
void
navigationInterfaceChanged(
DtVrfObject
*,
void
* usr);
243
virtual
void
processNavigationInterfaceChanged(
DtVrfObject
*);
244
245
protected
:
246
248
DtVrfObject
*
myEntityToFollow
;
249
251
DtHumanStateRepository
*
myHumanStateRepository
;
252
255
DtHumanFollowPSR
*
myProcessState
;
256
259
265
DtCollisionInputPort
*
myCollisionAvoidancePort
;
266
269
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
270
272
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
273
279
DtVectorOutputPort
*
myDestinationOutputPort
;
280
286
DtBooleanOutputPort
*
myIsMovingPort
;
287
293
DtBooleanOutputPort
*
myUseCollisionAvoidancePort
;
294
296
300
DtVector
myLocalDestination
;
301
304
DtVector
myWorldDestination
;
305
308
DtVector
myLocalDestinationMove
;
310
DtVector
myTopoDestinationMoveUnit2D
;
311
313
DtVector
myTopoDestinationToEntity2D
;
314
319
DtVector
myPredictedDestination
;
320
324
DtVector
myStationLocation
;
325
329
DtVector
myLookAheadStationLocation
;
330
334
bool
myNearDestination
;
335
bool
myPassedDestination
;
336
bool
myAtDestination
;
337
double
myDistanceSquared
;
338
bool
myDestinationIsInsideObstruction
;
339
double
myCurrentSpeed
;
341
345
double
myAtDistanceSquared
;
346
350
double
myNearDistanceSquared
;
351
358
double
myFarCatchUpFactor
;
359
370
bool
myIgnoreNavData
;
371
372
DtVector
myTransitionPoint
;
373
374
DtActiveBotNavInterface
*
myNavInterface
;
375
DtVector
myNavInterfaceCurrentDestination
;
376
double
myNavInterfaceDestinationSetTime
;
377
378
DtHumanFollowControllerDescriptor
*
myComponentDescriptor
;
379
380
DtTrigonometricSmoother*
myLeaderSmoother
;
381
bool
myWarnedOnceDestroyed
;
382
383
DtObjectIdOutputPort
*
myFollowTargetOutputPort
;
384
};
385
386
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)