VR-Forces 4.2 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
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
38
class
DT_DLL_vrfmodel
DtHumanMoveToController
:
public
DtSingleTaskControllerComponent
39
{
40
private
:
42
DtHumanMoveToController
();
44
DtHumanMoveToController
(
const
DtHumanMoveToController
& orig);
46
DtHumanMoveToController
&
operator=
(
const
DtHumanMoveToController
& orig);
47
public
:
49
DtHumanMoveToController
(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
*parentRegistry=0);
50
52
virtual
~
DtHumanMoveToController
();
53
55
virtual
bool
init
();
56
58
virtual
DtString
type
()
const
;
59
61
virtual
void
tick
();
62
67
static
void
moveToCallback(
DtSimMessage
* msg,
void
* usr);
68
73
static
void
setLocationCallback(
DtSimMessage
* msg,
void
* usr);
74
79
static
void
moveToLocationCallback(
DtSimMessage
* msg,
void
* usr);
80
82
static
DtSimComponent
* creator(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
* parentRegistry=0);
83
85
static
void
modifyVrfObjectCallback(
DtSimMessage
* msg,
void
* usr);
86
87
protected
:
88
91
virtual
void
processMoveToTask(
DtSimMessage
* msg);
92
93
94
virtual
void
processMoveToLocationTask(
DtSimMessage
* msg);
95
100
virtual
void
processDestinationChanged();
101
105
virtual
bool
setupDestination();
106
115
virtual
void
setupDestinationVector()
const
;
116
118
virtual
void
invalidateDestinationVector()
const
;
119
128
virtual
bool
atDestination();
129
131
virtual
void
doMoving();
132
134
virtual
double
findDesiredHeading();
135
137
virtual
void
moveToDestination();
138
140
virtual
void
stop();
141
143
virtual
void
registerTaskMsgCallbacks
();
144
148
virtual
void
processModifyVrfObject(
DtSimMessage
* msg);
149
152
virtual
void
processSetLocation(
DtSimMessage
* msg);
153
155
virtual
bool
createPortGroups
();
156
158
virtual
bool
createPorts
();
159
165
virtual
bool
createPSR();
166
167
virtual
double
distanceToDestination()
const
;
168
170
virtual
void
clearTask
();
171
173
virtual
bool
destinationIsInsideObstruction(
174
const
DtVector
& localDestination)
const
;
175
178
virtual
bool
decideToGiveUpTask
()
const
;
179
184
virtual
double
atDistance()
const
;
185
186
protected
:
187
190
197
DtCollisionInputPort
*
myCollisionAvoidancePort
;
198
201
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
202
204
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
205
211
DtVectorOutputPort
*
myDestinationOutputPort
;
212
214
217
DtVrfObject
*
myControlPoint
;
218
219
DtVector
myLocalDestination
;
220
DtVector
myWorldDestination
;
221
222
mutable
DtVector
myDestinationVector
;
223
mutable
bool
myDestinationVectorIsValid
;
224
225
bool
myAtDestination
;
226
double
myDistanceSquared
;
227
228
DtHumanStateRepository
*
myHumanStateRepository
;
229
232
DtHumanMoveToPSR
*
myProcessState
;
233
234
DtHumanMoveToControllerDescriptor
*
myHumanMoveToControllerDescriptor
;
235
};
236
238
void
registerDtHumanMoveToController
(
DtCgf
* cgf);
Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)