VR-Forces 4.5 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
humanFleeController.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2015 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
9
12
13
#pragma once
14
15
#include "
vrfmodel/vrfmodelDefines.h
"
16
#include "
vrfobjcore/singleTaskControllerComponent.h
"
17
#include <
vrfNavigation/navArea.h
>
18
19
class
DtHumanFleeControllerDescriptor
;
20
class
DtActiveBotNavInterface
;
21
class
DtScriptedTaskTask
;
22
class
DtHumanStateRepository
;
23
class
DtHumanFleePSR
;
24
class
DtHumanMovementControlOutputPortGroup
;
25
class
DtVectorOutputPort
;
26
class
DtBooleanOutputPort
;
27
32
class
DT_DLL_vrfmodel
DtHumanFleeController
:
public
DtSingleTaskControllerComponent
33
{
34
private
:
36
DtHumanFleeController
();
38
DtHumanFleeController
(
const
DtHumanFleeController
& orig);
40
DtHumanFleeController
&
operator=
(
const
DtHumanFleeController
& orig);
41
public
:
43
DtHumanFleeController
(
const
DtString
& name,
DtVrfObject
* owner,
44
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
*parentRegistry=0);
45
47
virtual
~
DtHumanFleeController
();
48
50
virtual
bool
init
();
51
53
virtual
const
char
*
type
()
const
;
54
56
virtual
void
tick
();
57
62
static
void
fleeCallback(
DtSimMessage
* msg,
void
* usr);
63
65
static
DtSimComponent
* creator(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
66
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
* parentRegistry=0);
67
68
protected
:
69
71
virtual
bool
createPortGroups
();
72
74
virtual
bool
createPorts
();
75
76
virtual
bool
usingNavBot()
const
;
77
78
virtual
void
processFleeTask(
DtSimMessage
* msg);
79
81
virtual
void
registerTaskMsgCallbacks
();
82
83
static
void
navAreaChangedCallback(
void
* usr);
84
virtual
void
processNavAreaChanged();
85
88
virtual
std::list<DtVector> getFleeFromPoints(
DtScriptedTaskTask
*);
89
91
virtual
double
getFleeRadius(
DtScriptedTaskTask
*);
92
94
virtual
bool
atDestination();
95
97
virtual
void
doMoving();
98
100
virtual
double
findDesiredHeading();
101
104
virtual
void
stop(
bool
success);
105
106
virtual
void
clearTask
();
107
111
virtual
DtVector
findFleeToPoint(
double
radius,
const
std::list<DtVector>& localFrom);
112
115
virtual
double
fleePointMaxCost(
const
std::list<DtVector>& fleeFromPtList,
const
DtVector
& fleeToPt,
116
double
maxFleeDist,
bool
collision);
117
120
virtual
double
fleePointCost(
const
DtVector
& fleeFromPt,
const
DtVector
& fleeToPt,
121
double
maxFleeDist,
bool
collision);
122
125
virtual
bool
pointsMoved(
const
std::list<DtVector>& pts1,
const
std::list<DtVector>& pts2,
double
threshhold);
126
128
static
void
objectAboutToBeRemoved(
DtVrfObject
* msg,
void
* usr);
129
virtual
void
processObjectAboutToBeRemoved(
DtVrfObject
* msg);
130
132
virtual
void
processFleeTask(
DtScriptedTaskTask
*);
133
134
virtual
void
showFleePoint();
135
136
virtual
void
preFirstTickInit
();
137
virtual
bool
createPSR();
138
139
virtual
bool
entityInDestination(
const
DtVector
& dest);
140
141
virtual
void
updateTaskVisualizations
();
142
143
protected
:
144
DtHumanFleeControllerDescriptor
*
myHumanFleeControllerDescriptor
;
145
DtActiveBotNavInterface
*
myNavInterface
;
146
bool
myIgnoreNavData
;
147
const
DtHumanStateRepository
*
myHumanSR
;
148
149
DtHumanFleePSR
*
myProcessState
;
150
151
bool
mySetupFromTaskWhenCan
;
154
std::list<DtVector>
myCachedFleeFromPoints
;
155
156
typedef
std::pair<DtVector, double>
PointAndCost
;
157
std::vector<PointAndCost>
myCandidateFleeToPoints
;
158
159
162
164
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
165
171
DtVectorOutputPort
*
myDestinationOutputPort
;
172
178
DtBooleanOutputPort
*
myIsMovingPort
;
179
181
182
bool
myWasTasked
;
183
};
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)