VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanMoveToController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Generated by VR-Forces Component Code Generator
3 ** WARNING: Changes to this file WILL BE LOST if file is regenerated.
4 *******************************************************************************/
5 
9 
12 
13 #pragma once
14 
17 
18 class DtCgf;
20 class DtSimMessage;
21 class DtHumanMoveToPSR;
23 class DtInputPortGroup;
25 class DtVectorOutputPort;
29 class DtGenericPsr;
30 
42 {
43 private:
50 public:
52  DtHumanMoveToController(const DtString& name, DtVrfObject* owner, DtSimManager* simManager, DtComponentDescriptor* desc=0, DtReaderWriterRegistry *parentRegistry=0);
53 
55  virtual ~DtHumanMoveToController();
56 
58  virtual bool init();
59 
61  virtual const char* type() const;
62 
64  virtual void tick();
65 
70  static void moveToCallback(DtSimMessage * msg, void * usr);
71 
76  static void setLocationCallback(DtSimMessage* msg, void* usr);
77 
82  static void moveToLocationCallback(DtSimMessage * msg, void * usr);
83 
85  static DtSimComponent* creator(const DtString& name, DtVrfObject* owner, DtSimManager* simManager, DtComponentDescriptor* desc=0, DtReaderWriterRegistry* parentRegistry=0);
86 
88  static void modifyVrfObjectCallback(DtSimMessage* msg, void* usr);
89 
90 protected:
91 
94  virtual void processMoveToTask(DtSimMessage * msg);
95 
96 
97  virtual void processMoveToLocationTask(DtSimMessage * msg);
98 
103  virtual void processDestinationChanged();
104 
108  virtual bool setupDestination();
109 
118  virtual void setupDestinationVector() const;
119 
121  virtual void invalidateDestinationVector() const;
122 
131  virtual bool atDestination();
132 
134  virtual void doMoving();
135 
137  virtual double findDesiredHeading();
138 
140  virtual double findDesiredSpeed();
141 
143  virtual void moveToDestination();
144 
147  virtual void stop(bool success);
148 
150  virtual void registerTaskMsgCallbacks();
151 
155  virtual void processModifyVrfObject(DtSimMessage* msg);
156 
159  virtual void processSetLocation(DtSimMessage* msg);
160 
162  virtual bool createPortGroups();
163 
165  virtual bool createPorts();
166 
172  virtual bool createPSR();
173 
174  virtual double distanceToDestination() const;
175 
177  virtual void clearTask();
178 
180  virtual bool destinationIsInsideObstruction(
181  const DtVector& localDestination) const;
182 
185  virtual bool decideToGiveUpTask() const;
186 
191  virtual double atDistance() const;
192 
194  virtual bool usingNavBot() const;
195 
197  virtual void useNavBotData();
198 
201  virtual unsigned maxNumFailedPathAttempts() const;
202 
205  virtual bool findAlternateDestination();
206 
208  virtual void setStuck(bool yesNo);
210  virtual double stuckTime();
211 
212  static void navAreaChangedCallback(void* usr);
213  virtual void processNavAreaChanged();
214 
218  DtVector localDestination() const;
219 
220  virtual void updateTaskVisualizations();
221 
224  virtual void suspendTask();
225 
226  static void navigationInterfaceChanged(DtVrfObject*, void* usr);
227  virtual void processNavigationInterfaceChanged(DtVrfObject*);
228 
229 protected:
230 
233 
241 
245 
248 
255 
262 
269 
271 
275 
278 
281 
284 
289 
290  //Used to force the navigation interface to be ignored.
291  //This is useful when the nav interface has given us a partial
292  //path to the destination (for example, if we're in a nav area
293  //but our destination is outside the nav area).
294  //Once set, gets reset when any of the following happen:
295  //1) A new task is issued
296  //2) The destination location changes
297  //3) A set location occurs
298  //4) The entity moves to a new navArea.
300 
302 
304 
308  //DtGenericPsr* myHumanMovePsr;
309 
312 };
313 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)