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
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
17
class
DtHumanStateRepository
;
18
class
DtHumanFollowPSR
;
19
class
DtInputPortGroup
;
20
class
DtCollisionInputPort
;
21
class
DtHumanMovementControlOutputPortGroup
;
22
class
DtVectorOutputPort
;
23
32
class
DT_DLL_vrfmodel
DtHumanFollowController
:
public
DtSingleTaskControllerComponent
33
{
34
35
public
:
36
39
DtHumanFollowController
(
const
DtString
& name,
40
DtVrfObject
* owner,
41
DtSimManager
* simManager,
42
DtComponentDescriptor
* desc = 0,
43
DtReaderWriterRegistry
* parentRegistry = 0);
44
46
virtual
~
DtHumanFollowController
();
47
50
virtual
DtString
type
()
const
;
51
53
virtual
bool
init
();
54
60
virtual
bool
createPSR();
61
63
virtual
void
tick
();
64
68
static
void
followEntityCallback(
DtSimMessage
* msg,
void
* usrData);
69
70
virtual
void
processFollowEntityTask(
DtSimMessage
* msg);
71
76
virtual
const
DtString
& entityToFollow();
77
virtual
void
setEntityToFollow(
const
DtString
& entity);
78
81
virtual
const
DtVector
& offsetVector()
const
;
82
virtual
void
setOffsetVector(
const
DtVector
& offsets);
83
87
static
DtSimComponent
* creator(
const
DtString
& name,
88
DtVrfObject
* owner,
89
DtSimManager
* simManager,
90
DtComponentDescriptor
* desc = 0,
91
DtReaderWriterRegistry
* parentRegistry = 0);
92
94
virtual
void
registerTaskMsgCallbacks
();
95
99
virtual
bool
setupDestination();
100
103
virtual
bool
passedDestination();
104
107
virtual
double
findDesiredSpeed();
108
112
virtual
double
findDesiredHeading();
113
124
virtual
void
setupDestinationVector()
const
;
125
129
virtual
void
stop();
130
131
virtual
void
clearTask
();
132
133
protected
:
134
136
DtHumanFollowController
(
const
DtHumanFollowController
&
137
orig);
138
140
const
DtHumanFollowController
&
operator=
(
const
141
DtHumanFollowController
& orig);
142
144
virtual
void
invalidateDestinationVector()
const
;
145
156
virtual
bool
nearDestination();
157
166
virtual
bool
getDestination(
DtVector
& destination);
167
172
virtual
const
DtVector
& destinationVector()
const
;
173
182
virtual
bool
atDestination();
183
186
virtual
void
doMoving();
187
189
virtual
bool
destinationIsInsideObstruction(
190
const
DtVector
& localDestination)
const
;
191
193
virtual
bool
createPortGroups
();
194
196
virtual
bool
createPorts
();
197
199
virtual
void
moveToDestination();
200
201
virtual
double
distanceToDestination()
const
;
202
203
protected
:
204
206
DtVrfObject
*
myEntityToFollow
;
207
209
DtHumanStateRepository
*
myHumanStateRepository
;
210
213
DtHumanFollowPSR
*
myProcessState
;
214
217
223
DtCollisionInputPort
*
myCollisionAvoidancePort
;
224
227
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
228
230
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
231
237
DtVectorOutputPort
*
myDestinationOutputPort
;
238
240
241
DtVector
myLocalDestination
;
242
DtVector
myWorldDestination
;
243
mutable
DtVector
myDestinationVector
;
244
mutable
bool
myDestinationVectorIsValid
;
245
bool
myNearDestination
;
246
bool
myPassedDestination
;
247
bool
myAtDestination
;
248
double
myDistanceSquared
;
249
bool
myDestinationIsInsideObstruction
;
250
double
myCurrentSpeed
;
251
255
double
myAtDistanceSquared
;
256
260
double
myNearDistanceSquared
;
261
265
double
myApproachSpeed
;
266
272
double
myPassedSlowDownFactor
;
273
280
double
myFarCatchUpFactor
;
281
288
double
myNearCatchUpFactor
;
289
};
290
291
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
)