VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfmodel
humanMoveAlongController.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2016 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
11
12
#pragma once
13
14
#include "
vrfobjcore/singleTaskControllerComponent.h
"
15
#include "
vrfmodel/vrfmodelDefines.h
"
16
#include "
vrfmodel/bindableLuaComponent.h
"
17
18
class
DtCgf
;
19
class
DtHumanStateRepository
;
20
class
DtSimMessage
;
21
class
DtHumanMoveAlongPSR
;
22
class
DtHumanMoveAlongControllerDescriptor
;
23
35
class
DT_DLL_vrfmodel
DtHumanMoveAlongController
:
public
DtSingleTaskControllerComponent
36
{
37
private
:
39
DtHumanMoveAlongController
();
41
DtHumanMoveAlongController
(
const
DtHumanMoveAlongController
& orig);
43
DtHumanMoveAlongController
&
operator=
(
44
const
DtHumanMoveAlongController
& orig);
45
public
:
48
DtHumanMoveAlongController
(
const
DtString
& name,
DtVrfObject
* owner,
49
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
50
DtReaderWriterRegistry
*parentRegistry=0);
51
53
virtual
~
DtHumanMoveAlongController
();
54
56
virtual
bool
init
();
57
60
virtual
const
char
*
type
()
const
;
61
66
virtual
void
preFirstTickInit
();
67
75
virtual
void
tick
();
76
77
static
void
moveAlongCallback(
DtSimMessage
* msg,
void
* usr,
DtSimTaskStatePtr
taskStatePtr);
78
79
virtual
DtSimTaskStatePtr
currentTaskState
()
const
;
80
84
static
void
routeChangedCallback(
DtVrfObject
* obj,
void
* usr);
85
virtual
void
processRouteChanged(
DtVrfObject
* obj);
86
88
virtual
void
registerTaskMsgCallbacks
();
89
97
virtual
bool
setupRoute(
bool
routeHasChanged,
bool
resetVertex);
98
105
virtual
bool
setupDestination();
106
112
virtual
void
stop();
113
115
static
void
objectAddedCb(
DtVrfObject
* vrfObject,
void
* usr);
116
118
static
DtSimComponent
* creator(
const
DtString
& name,
DtVrfObject
* owner,
119
DtSimManager
* simManager,
DtComponentDescriptor
* desc=0,
120
DtReaderWriterRegistry
* parentRegistry=0);
121
127
virtual
bool
createPSR();
128
129
protected
:
130
virtual
void
processMoveAlong(
const
DtTaskMessage
& msg,
DtSimTaskStatePtr
taskStatePtr);
131
135
virtual
void
buildLocalRoute();
136
139
virtual
void
emptyVertexList();
140
142
static
DtReaderWriter
* provideNextRoutePointIndex(
void
* c);
143
145
virtual
DtHumanMoveAlongPSR
*
getPSR
(){
return
myProcessState;}
146
150
virtual
void
processObjectAdded(
DtVrfObject
* vrfObject);
151
153
virtual
void
setDestination(
const
DtVector
& localLocation);
154
virtual
void
createMoveToPoint(
const
DtVector
& localLocation);
155
157
virtual
void
sendMoveToSubtask();
158
161
virtual
void
clearTask
();
162
166
virtual
bool
getCurrentRouteSegment(
DtVector
& routeSegmentStart,
167
DtVector
& routeSegmentEnd)
const
;
168
170
virtual
void
cleanupMoveToPoint();
171
172
static
void
taskCompleteReportCallback(
DtSimMessage
* msg,
void
* usr);
173
virtual
void
processTaskCompleteReport(
DtSimMessage
* msg);
174
175
virtual
bool
passedDestination();
176
virtual
void
setupDestinationVector();
177
178
virtual
bool
atDestination()
const
;
179
virtual
double
distanceToDestination()
const
;
180
181
virtual
double
atDistance()
const
;
182
183
protected
:
184
185
DtHumanStateRepository
*
myHumanStateRepository
;
186
189
DtHumanMoveAlongPSR
*
myProcessState
;
190
191
DtHumanMoveAlongControllerDescriptor
*
myHumanMoveAlongControllerDescriptor
;
192
195
DtVrfObject
*
myRoute
;
196
197
DtVector
myWorldDestination
;
198
DtVector
myLocalDestination
;
199
200
DtVector
myDestinationVector
;
201
202
bool
myOverrideSpeed
;
203
double
myOverrideSpeedValue
;
204
};
205
208
void
registerDtHumanMoveAlongController
(
DtCgf
* cgf);
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)