VR-Forces Development_Version 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 void moveToDestination();
141 
144  virtual void stop(bool success);
145 
147  virtual void registerTaskMsgCallbacks();
148 
152  virtual void processModifyVrfObject(DtSimMessage* msg);
153 
156  virtual void processSetLocation(DtSimMessage* msg);
157 
159  virtual bool createPortGroups();
160 
162  virtual bool createPorts();
163 
169  virtual bool createPSR();
170 
171  virtual double distanceToDestination() const;
172 
174  virtual void clearTask();
175 
177  virtual bool destinationIsInsideObstruction(
178  const DtVector& localDestination) const;
179 
182  virtual bool decideToGiveUpTask() const;
183 
188  virtual double atDistance() const;
189 
191  virtual bool usingNavBot() const;
192 
194  virtual void useNavBotData();
195 
197  virtual void setStuck(bool yesNo);
199  virtual double stuckTime();
200 
201  static void navAreaChangedCallback(void* usr);
202  virtual void processNavAreaChanged();
203 
207  DtVector localDestination() const;
208 
209  virtual void updateTaskVisualizations();
210 
213  virtual void suspendTask();
214 
215 protected:
216 
219 
227 
231 
234 
241 
248 
250 
254 
257 
260 
263 
264  //Used to force the navigation interface to be ignored.
265  //This is useful when the nav interface has given us a partial
266  //path to the destination (for example, if we're in a nav area
267  //but our destination is outside the nav area).
268  //Once set, gets reset when any of the following happen:
269  //1) A new task is issued
270  //2) The destination location changes
271  //3) A set location occurs
272  //4) The entity moves to a new navArea.
274 
276 
280  //DtGenericPsr* myHumanMovePsr;
281 
284 };
285 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)