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
humanMoveToController.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Generated by VR-Forces Component Code Generator
3
** WARNING: Changes to this file WILL BE LOST if file is regenerated.
4
*******************************************************************************/
5
9
12
13
#pragma once
14
15
#include "
vrfobjcore/singleTaskControllerComponent.h
"
16
#include "
vrfmodel/vrfmodelDefines.h
"
17
18
class
DtCgf
;
19
class
DtHumanStateRepository
;
20
class
DtSimMessage
;
21
class
DtHumanMoveToPSR
;
22
class
DtCollisionInputPort
;
23
class
DtInputPortGroup
;
24
class
DtHumanMovementControlOutputPortGroup
;
25
class
DtVectorOutputPort
;
26
class
DtHumanMoveToControllerDescriptor
;
27
class
DtBooleanOutputPort
;
28
class
DtActiveBotNavInterface
;
29
class
DtGenericPsr
;
30
41
class
DT_DLL_vrfmodel
DtHumanMoveToController
:
public
DtSingleTaskControllerComponent
42
{
43
private
:
45
DtHumanMoveToController
();
47
DtHumanMoveToController
(
const
DtHumanMoveToController
& orig);
49
DtHumanMoveToController
&
operator=
(
const
DtHumanMoveToController
& orig);
50
public
:
52
DtHumanMoveToController
(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
*parentRegistry=0);
53
55
virtual
~
DtHumanMoveToController
();
56
58
virtual
bool
init
();
59
61
virtual
const
char
*
type
()
const
;
62
64
virtual
void
tick
();
65
70
static
void
moveToCallback(
DtSimMessage
* msg,
void
* usr);
71
76
static
void
setLocationCallback(
DtSimMessage
* msg,
void
* usr);
77
82
static
void
moveToLocationCallback(
DtSimMessage
* msg,
void
* usr);
83
85
static
DtSimComponent
* creator(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
* parentRegistry=0);
86
88
static
void
modifyVrfObjectCallback(
DtSimMessage
* msg,
void
* usr);
89
90
protected
:
91
94
virtual
void
processMoveToTask(
DtSimMessage
* msg);
95
96
97
virtual
void
processMoveToLocationTask(
DtSimMessage
* msg);
98
103
virtual
void
processDestinationChanged();
104
108
virtual
bool
setupDestination();
109
118
virtual
void
setupDestinationVector()
const
;
119
121
virtual
void
invalidateDestinationVector()
const
;
122
131
virtual
bool
atDestination();
132
134
virtual
void
doMoving();
135
137
virtual
double
findDesiredHeading();
138
140
virtual
void
moveToDestination();
141
144
virtual
void
stop(
bool
success);
145
147
virtual
void
registerTaskMsgCallbacks
();
148
152
virtual
void
processModifyVrfObject(
DtSimMessage
* msg);
153
156
virtual
void
processSetLocation(
DtSimMessage
* msg);
157
159
virtual
bool
createPortGroups
();
160
162
virtual
bool
createPorts
();
163
169
virtual
bool
createPSR();
170
171
virtual
double
distanceToDestination()
const
;
172
174
virtual
void
clearTask
();
175
177
virtual
bool
destinationIsInsideObstruction(
178
const
DtVector
& localDestination)
const
;
179
182
virtual
bool
decideToGiveUpTask
()
const
;
183
188
virtual
double
atDistance()
const
;
189
191
virtual
bool
usingNavBot()
const
;
192
194
virtual
void
useNavBotData();
195
197
virtual
void
setStuck(
bool
yesNo);
199
virtual
double
stuckTime();
200
201
static
void
navAreaChangedCallback(
void
* usr);
202
virtual
void
processNavAreaChanged();
203
207
DtVector
localDestination()
const
;
208
209
virtual
void
updateTaskVisualizations
();
210
213
virtual
void
suspendTask
();
214
215
protected
:
216
219
226
DtCollisionInputPort
*
myCollisionAvoidancePort
;
227
230
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
231
233
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
234
240
DtVectorOutputPort
*
myDestinationOutputPort
;
241
247
DtBooleanOutputPort
*
myIsMovingPort
;
248
250
253
DtVrfObject
*
myControlPoint
;
254
255
DtVector
myLocalDestination
;
256
DtVector
myWorldDestination
;
257
258
mutable
DtVector
myDestinationVector
;
259
mutable
bool
myDestinationVectorIsValid
;
260
261
bool
myAtDestination
;
262
double
myDistanceSquared
;
263
264
//Used to force the navigation interface to be ignored.
265
//This is useful when the nav interface has given us a partial
266
//path to the destination (for example, if we're in a nav area
267
//but our destination is outside the nav area).
268
//Once set, gets reset when any of the following happen:
269
//1) A new task is issued
270
//2) The destination location changes
271
//3) A set location occurs
272
//4) The entity moves to a new navArea.
273
bool
myIgnoreNavData
;
274
275
DtHumanStateRepository
*
myHumanStateRepository
;
276
279
DtHumanMoveToPSR
*
myProcessState
;
280
//DtGenericPsr* myHumanMovePsr;
281
282
DtHumanMoveToControllerDescriptor
*
myHumanMoveToControllerDescriptor
;
283
DtActiveBotNavInterface
*
myNavInterface
;
284
};
285
287
void
registerDtHumanMoveToController
(
DtCgf
* cgf);
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
)