VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
humanFollowController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 #include <vlpi/trigonometricSmoother.h>
17 
19 class DtHumanFollowPSR;
20 class DtInputPortGroup;
23 class DtVectorOutputPort;
27 
37 {
38 
39 public:
40 
43  DtHumanFollowController(const DtString& name,
44  DtVrfObject* owner,
45  DtSimManager* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
50  virtual ~DtHumanFollowController();
51 
54  virtual const char* type() const;
55 
57  virtual bool init();
58 
64  virtual bool createPSR();
65 
67  virtual void tick();
68 
72  static void followEntityCallback(DtSimMessage* msg, void* usrData);
73 
74  virtual void processFollowEntityTask(DtSimMessage* msg);
75 
80  virtual const DtUUID& entityToFollow();
81  virtual void setEntityToFollow(const DtUUID& entity);
82 
85  virtual const DtVector& offsetVector() const;
86  virtual void setOffsetVector(const DtVector& offsets);
87 
91  static DtSimComponent * creator(const DtString& name,
92  DtVrfObject* owner,
93  DtSimManager* simManager,
94  DtComponentDescriptor* desc = 0,
95  DtReaderWriterRegistry* parentRegistry = 0);
96 
98  virtual void registerTaskMsgCallbacks();
99 
112  virtual bool setupDestination();
113 
116  virtual bool passedDestination();
117 
120  virtual double findDesiredSpeed();
121 
125  virtual double findDesiredHeading();
126 
130  virtual void stop();
131 
132  virtual void clearTask();
133 
134 protected:
135 
138  orig);
139 
141  const DtHumanFollowController & operator=(const
142  DtHumanFollowController & orig);
143 
150  virtual void setSmoother(const DtVector& location);
151 
158  virtual DtVector smoothedLocation();
159 
165  virtual bool nearDestination();
166 
170  virtual double distanceToDestination() const;
171 
177  virtual DtVector localDestination() const;
178 
183  virtual bool getDestination(DtVector & destination) const;
184 
185 
194  virtual bool atDestination();
195 
198  virtual void doMoving();
199 
201  virtual bool destinationIsInsideObstruction(
202  const DtVector& localDestination) const;
203 
205  virtual bool createPortGroups();
206 
208  virtual bool createPorts();
209 
211  virtual void moveToDestination();
212 
216  virtual void computeTopoVectors();
217 
219  virtual bool usingNavBot();
220 
223  virtual void moveUsingNavData();
224 
225  static void navAreaChangedCallback(void* usr);
226  virtual void processNavAreaChanged();
227 
230  virtual bool needToUpdateNavInterfaceDestination(const DtVector& newLocalDestination);
231 
237  virtual DtVector predictedDestination();
238 
239  virtual void updateTaskVisualizations();
240 
241 protected:
242 
245 
248 
252 
255 
262 
266 
269 
276 
283 
285 
290 
294 
300 
303 
309 
314 
319 
330 
335 
340 
348 
360 
362 
366 
368 
369  DtTrigonometricSmoother* myLeaderSmoother;
371 };
372 
373 

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)