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
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
DtVector
getFleeFromPoint(
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
DtVector
& localFrom);
112
115
virtual
double
fleePointCost(
const
DtVector
& fleeFromPt,
const
DtVector
& fleeToPt,
116
double
maxFleeDist,
bool
collision);
117
119
static
void
objectAboutToBeRemoved(
DtVrfObject
* msg,
void
* usr);
120
virtual
void
processObjectAboutToBeRemoved(
DtVrfObject
* msg);
121
123
virtual
void
processFleeTask(
DtScriptedTaskTask
*);
124
125
virtual
void
showFleePoint();
126
127
virtual
void
preFirstTickInit
();
128
virtual
bool
createPSR();
129
130
virtual
bool
entityInDestination(
const
DtVector
& dest);
131
132
virtual
void
updateTaskVisualizations
();
133
134
protected
:
135
DtHumanFleeControllerDescriptor
*
myHumanFleeControllerDescriptor
;
136
DtActiveBotNavInterface
*
myNavInterface
;
137
bool
myIgnoreNavData
;
138
const
DtHumanStateRepository
*
myHumanSR
;
139
140
DtHumanFleePSR
*
myProcessState
;
141
142
bool
mySetupFromTaskWhenCan
;
143
144
typedef
std::pair<DtVector, double>
PointAndCost
;
145
std::vector<PointAndCost>
myCandidateFleeToPoints
;
146
147
150
152
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
153
159
DtVectorOutputPort
*
myDestinationOutputPort
;
160
166
DtBooleanOutputPort
*
myIsMovingPort
;
167
169
};
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
)