VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
200  virtual void setStuck(bool yesNo);
202  virtual double stuckTime();
203 
204  static void navAreaChangedCallback(void* usr);
205  virtual void processNavAreaChanged();
206 
210  DtVector localDestination() const;
211 
212  virtual void updateTaskVisualizations();
213 
216  virtual void suspendTask();
217 
218 protected:
219 
222 
230 
234 
237 
244 
251 
253 
257 
260 
263 
266 
271 
272  //Used to force the navigation interface to be ignored.
273  //This is useful when the nav interface has given us a partial
274  //path to the destination (for example, if we're in a nav area
275  //but our destination is outside the nav area).
276  //Once set, gets reset when any of the following happen:
277  //1) A new task is issued
278  //2) The destination location changes
279  //3) A set location occurs
280  //4) The entity moves to a new navArea.
282 
284 
288  //DtGenericPsr* myHumanMovePsr;
289 
292 };
293 

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)