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
double
findDesiredSpeed();
141
143
virtual
void
moveToDestination();
144
147
virtual
void
stop(
bool
success);
148
150
virtual
void
registerTaskMsgCallbacks
();
151
155
virtual
void
processModifyVrfObject(
DtSimMessage
* msg);
156
159
virtual
void
processSetLocation(
DtSimMessage
* msg);
160
162
virtual
bool
createPortGroups
();
163
165
virtual
bool
createPorts
();
166
172
virtual
bool
createPSR();
173
174
virtual
double
distanceToDestination()
const
;
175
177
virtual
void
clearTask
();
178
180
virtual
bool
destinationIsInsideObstruction(
181
const
DtVector
& localDestination)
const
;
182
185
virtual
bool
decideToGiveUpTask
()
const
;
186
191
virtual
double
atDistance()
const
;
192
194
virtual
bool
usingNavBot()
const
;
195
197
virtual
void
useNavBotData();
198
200
virtual
void
setStuck(
bool
yesNo);
202
virtual
double
stuckTime();
203
204
static
void
navAreaChangedCallback(
void
* usr);
205
virtual
void
processNavAreaChanged();
206
210
DtVector
localDestination()
const
;
211
212
virtual
void
updateTaskVisualizations
();
213
216
virtual
void
suspendTask
();
217
218
protected
:
219
222
229
DtCollisionInputPort
*
myCollisionAvoidancePort
;
230
233
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
234
236
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
237
243
DtVectorOutputPort
*
myDestinationOutputPort
;
244
250
DtBooleanOutputPort
*
myIsMovingPort
;
251
253
256
DtVrfObject
*
myControlPoint
;
257
258
DtVector
myLocalDestination
;
259
DtVector
myWorldDestination
;
260
261
mutable
DtVector
myDestinationVector
;
262
mutable
bool
myDestinationVectorIsValid
;
263
264
bool
myAtDestination
;
265
double
myDistanceSquared
;
266
267
bool
myOverrideAtDistance
;
268
double
myOverrideAtDistanceValue
;
269
270
bool
myOverrideSpeed
;
271
double
myOverrideSpeedValue
;
272
273
//Used to force the navigation interface to be ignored.
274
//This is useful when the nav interface has given us a partial
275
//path to the destination (for example, if we're in a nav area
276
//but our destination is outside the nav area).
277
//Once set, gets reset when any of the following happen:
278
//1) A new task is issued
279
//2) The destination location changes
280
//3) A set location occurs
281
//4) The entity moves to a new navArea.
282
bool
myIgnoreNavData
;
283
284
DtHumanStateRepository
*
myHumanStateRepository
;
285
288
DtHumanMoveToPSR
*
myProcessState
;
289
//DtGenericPsr* myHumanMovePsr;
290
291
DtHumanMoveToControllerDescriptor
*
myHumanMoveToControllerDescriptor
;
292
DtActiveBotNavInterface
*
myNavInterface
;
293
};
294
296
void
registerDtHumanMoveToController
(
DtCgf
* cgf);
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)