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
humanCoverPointController.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
DtHumanCoverPointControllerDescriptor
;
20
class
DtActiveBotNavInterface
;
21
class
DtScriptedTaskTask
;
22
class
DtHumanMovementControlOutputPortGroup
;
23
class
DtBooleanOutputPort
;
24
class
DtHumanStateRepository
;
25
class
DtHumanCoverPointPSR
;
26
class
DtCollisionInputPort
;
27
class
DtVectorOutputPort
;
28
33
class
DT_DLL_vrfmodel
DtHumanCoverPointController
:
public
DtSingleTaskControllerComponent
34
{
35
private
:
37
DtHumanCoverPointController
();
39
DtHumanCoverPointController
(
const
DtHumanCoverPointController
& orig);
41
DtHumanCoverPointController
&
operator=
(
const
DtHumanCoverPointController
& orig);
42
43
public
:
45
DtHumanCoverPointController
(
const
DtString
& name,
DtVrfObject
* owner,
46
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
*parentRegistry=0);
47
49
virtual
~
DtHumanCoverPointController
();
50
52
virtual
bool
init
();
53
55
virtual
const
char
*
type
()
const
;
56
58
virtual
void
tick
();
59
64
static
void
coverPointCallback(
DtSimMessage
* msg,
void
* usr);
65
67
static
DtSimComponent
* creator(
const
DtString
& name,
DtVrfObject
* owner,
DtSimManager
* simManager,
68
DtComponentDescriptor
* desc=0,
DtReaderWriterRegistry
* parentRegistry=0);
69
70
protected
:
71
virtual
bool
usingNavBot()
const
;
72
73
virtual
void
processCoverPointTask(
DtSimMessage
* msg);
74
76
virtual
void
registerTaskMsgCallbacks
();
77
78
static
void
navAreaChangedCallback(
void
* usr);
79
virtual
void
processNavAreaChanged();
80
82
virtual
DtVector
findCoverFromPoint(
DtScriptedTaskTask
*);
83
84
virtual
void
clearTask
();
85
88
virtual
bool
findCoverPoint(
DtVector
&);
89
92
static
DtOnGraphVertexVisitedResult
coverPointCheckCallback(
const
DtVector
& localCheck,
void
* usr);
93
virtual
DtOnGraphVertexVisitedResult
processCoverPoint(
const
DtVector
& localCheck);
94
96
static
void
coverPointCostPointModificationCallback(
const
DtVector
& localCheck,
float
* costmod,
void
* usr);
97
virtual
void
processCoverPointCostPointModification(
const
DtVector
& localCheck,
float
* costmod);
98
100
static
void
objectAboutToBeRemoved(
DtVrfObject
* msg,
void
* usr);
101
virtual
void
processObjectAboutToBeRemoved(
DtVrfObject
* msg);
102
103
virtual
void
offsetForEntity(
DtVector
& localPosition)
const
;
104
105
virtual
void
useNavBotData();
106
107
virtual
bool
createPortGroups
();
108
virtual
bool
createPorts
();
109
virtual
void
stop(
bool
success);
110
virtual
void
moveToDestination();
111
113
virtual
void
processCoverPointTask(
DtScriptedTaskTask
*);
114
115
virtual
void
showCoverPoint();
116
117
virtual
void
preFirstTickInit
();
118
virtual
bool
createPSR();
119
121
virtual
bool
destinationIsInsideObstruction(
const
DtVector
& localDestination);
122
123
virtual
void
setupPathFollowing();
124
126
virtual
DtVector
targetPoint(
const
DtVector
& from,
double
heading,
double
distance
)
const
;
127
129
virtual
bool
hasLosTo(
const
DtVector
& origin,
double
headingOffOfOrigin,
double
offsetFromOrigin,
130
double
headingToTargetPoint,
double
distanceToTargetPoint);
131
132
virtual
bool
entityInDestination(
const
DtVector
& dest);
133
134
protected
:
135
DtHumanCoverPointControllerDescriptor
*
myHumanCoverPointControllerDescriptor
;
136
DtActiveBotNavInterface
*
myNavInterface
;
137
bool
myIgnoreNavData
;
138
std::vector<DtUUID>
myFindCoverFrom
;
139
const
DtHumanStateRepository
*
myHumanSR
;
140
DtNavAreaQuery::Ptr
myCoverPointQuery
;
141
148
DtCollisionInputPort
*
myCollisionAvoidancePort
;
149
152
DtInputPortGroup
*
myCollisionAvoidancePortGroup
;
153
155
DtHumanMovementControlOutputPortGroup
*
myHumanMovementControlOutputPortGroup
;
156
162
DtVectorOutputPort
*
myDestinationOutputPort
;
163
169
DtBooleanOutputPort
*
myIsMovingPort
;
170
171
DtHumanCoverPointPSR
*
myProcessState
;
172
173
bool
myResetRouteWhenCan
;
174
bool
mySetupFromTaskWhenCan
;
175
int
myOnPass
;
176
double
myPostSpacing
;
177
double
mySearchRadius
;
178
DtVector
mySearchStartPoint
;
179
DtVector
myFindCoverFromPoint
;
180
bool
myCalculatingCoverPoint
;
181
boost::unordered_set<std::string>
myCheckedPoints
;
182
183
int
myCoverPointEvalCounter
;
184
};
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
)