VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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;
28 
38 {
39 
40 public:
41 
44  DtHumanFollowController(const DtString& name,
45  DtVrfObject* owner,
46  DtSimManager* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
51  virtual ~DtHumanFollowController();
52 
55  virtual const char* type() const;
56 
58  virtual bool init();
59 
65  virtual bool createPSR();
66 
68  virtual void tick();
69 
73  static void followEntityCallback(DtSimMessage* msg, void* usrData);
74 
75  virtual void processFollowEntityTask(DtSimMessage* msg);
76 
81  virtual const DtUUID& entityToFollow();
82  virtual void setEntityToFollow(const DtUUID& entity);
83 
86  virtual const DtVector& offsetVector() const;
87  virtual void setOffsetVector(const DtVector& offsets);
88 
92  static DtSimComponent * creator(const DtString& name,
93  DtVrfObject* owner,
94  DtSimManager* simManager,
95  DtComponentDescriptor* desc = 0,
96  DtReaderWriterRegistry* parentRegistry = 0);
97 
99  virtual void registerTaskMsgCallbacks();
100 
113  virtual bool setupDestination();
114 
117  virtual bool passedDestination();
118 
121  virtual double findDesiredSpeed();
122 
126  virtual double findDesiredHeading();
127 
131  virtual void stop();
132 
133  virtual void clearTask();
134 
135 protected:
136 
139  orig);
140 
142  const DtHumanFollowController & operator=(const
143  DtHumanFollowController & orig);
144 
151  virtual void setSmoother(const DtVector& location);
152 
159  virtual DtVector smoothedLocation();
160 
166  virtual bool nearDestination();
167 
171  virtual double distanceToDestination() const;
172 
178  virtual DtVector localDestination() const;
179 
184  virtual bool getDestination(DtVector & destination) const;
185 
186 
195  virtual bool atDestination();
196 
199  virtual void doMoving();
200 
202  virtual bool destinationIsInsideObstruction(
203  const DtVector& localDestination) const;
204 
206  virtual bool createPortGroups();
207 
209  virtual bool createPorts();
210 
212  virtual void moveToDestination();
213 
217  virtual void computeTopoVectors();
218 
220  virtual bool usingNavBot();
221 
224  virtual void moveUsingNavData();
225 
226  static void navAreaChangedCallback(void* usr);
227  virtual void processNavAreaChanged();
228 
231  virtual bool needToUpdateNavInterfaceDestination(const DtVector& newLocalDestination);
232 
238  virtual DtVector predictedDestination();
239 
240  virtual void updateTaskVisualizations();
241 
242  static void navigationInterfaceChanged(DtVrfObject*, void* usr);
243  virtual void processNavigationInterfaceChanged(DtVrfObject*);
244 
245 protected:
246 
249 
252 
256 
259 
266 
270 
273 
280 
287 
294 
296 
301 
305 
311 
314 
320 
325 
330 
341 
346 
351 
359 
371 
373 
377 
379 
380  DtTrigonometricSmoother* myLeaderSmoother;
382 
384 };
385 
386 

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)