VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aggregatedMoveAlongController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 
13 class DtCgf;
14 class DtAnalogOutputPort;
15 class DtVectorOutputPort;
20 
26 {
27 private:
35 public:
38  DtSimManager* simManager, DtComponentDescriptor* desc=0,
39  DtReaderWriterRegistry *parentRegistry=0);
40 
43 
45  virtual bool init();
46 
48  virtual DtString type() const;
49 
53  virtual void preFirstTickInit();
54 
56  virtual void tick();
57 
61  static void routeChangedCallback(DtVrfObject* obj, void * usr);
62  virtual void processRouteChanged(DtVrfObject* obj);
63 
65  virtual void registerTaskMsgCallbacks();
66 
67  static void moveAlongCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
68  static void moveAlongRetrogradeCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
69 
77  virtual bool setupRoute();
78 
85  virtual bool setupDestination();
86 
88  virtual double findDesiredSpeed();
89 
95  virtual void stop();
96 
98  static void objectAddedCb(DtVrfObject * vrfObject, void * usr);
99 
101  static DtSimComponent* creator(const DtString& name, DtVrfObject* owner,
102  DtSimManager* simManager, DtComponentDescriptor* desc=0,
103  DtReaderWriterRegistry* parentRegistry=0);
104 
106  virtual bool createPorts();
107 
109  virtual bool createPortGroups();
110 
116  virtual bool createPSR();
117 
120  virtual void doMoving();
121 
124  virtual double findDesiredHeading(DtVector& dest);
125 
127  //virtual bool destinationIsInsideObstruction(
129 
132  //virtual bool decideToGiveUpTask() const;
133 
134 protected:
135  virtual void processMoveAlong(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
136  virtual void processMoveAlongRetrograde(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
137 
141  virtual void buildLocalRoute();
142 
145  virtual void emptyVertexList();
146 
150  virtual void processObjectAdded(DtVrfObject * vrfObject);
151 
154  virtual void clearTask();
155 
157  virtual void moveToDestination();
158 
160  virtual void invalidateDestinationVector() const;
161  virtual double distanceToDestination() const;
162 
171  virtual bool atDestination();
172 
182  virtual bool passedDestination();
183 
192  virtual bool getDestination(DtVector & destination);
193 
198  virtual const DtVector& destinationVector() const;
199 
208  virtual void setupDestinationVector() const;
209 
214  virtual double atDistance() const;
215 
221  virtual bool stayOnRoute() const;
222 
227  virtual double minCorrectionDistance() const;
228 
236  virtual double maxCorrectionDistance() const;
237 
241  virtual double maxCorrectionAngle() const;
242 
251  virtual void computePointToSegmentGeometry(
252  const DtVector& localPoint,
253  const DtVector& localLinePt1, const DtVector& localLinePt2,
254  const Coordinate_System& coordinateSystemRef,
255  double& r, bool &leftSide, double &distanceToSegment);
256 
260  virtual bool getCurrentRouteSegment(DtVector& routeSegmentStart,
261  DtVector& routeSegmentEnd) const;
262 
264 
265 protected:
266 
275 
281 
288 
290 
294 
295 
299 
304 
306 
309 
316 
319 };

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)