VR-Forces 4.1.1 Class Documentation
humanPatrolController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 
13 #pragma once
14 
17 
18 class DtFormationState;
19 class DtHumanPatrolPSR;
20 class DtVrfObjectManager;
21 
33 {
34 public:
35 
37  {
38  DtMovingAlongRoute = 0,
39  DtReversingDirection = 1
40  };
41 
44  DtHumanPatrolController(const DtString& name,
45  DtVrfObject* owner,
46  DtSimManager* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
51  virtual ~DtHumanPatrolController();
52 
55  virtual DtString type() const;
56 
59  virtual bool init();
60 
62  virtual void registerTaskMsgCallbacks();
63 
68  static void patrolTwoPointsTaskCallback(DtSimMessage * msg, void * usr);
69 
73  static void patrolAlongTaskCallback(DtSimMessage * msg, void * usr);
74 
79  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
80 
84  static DtSimComponent * creator(const DtString& name,
85  DtVrfObject* owner,
86  DtSimManager* simManager,
87  DtComponentDescriptor* desc = 0,
88  DtReaderWriterRegistry* parentRegistry = 0);
89 
90 protected:
91 
96  virtual void onPatrolTwoPointsTask(DtSimMessage * msg);
97 
105  virtual void onTaskComplete(DtSimMessage * msg);
106 
114  virtual bool moveTo(const DtString& controlPointName);
115 
119  virtual void processPatrolAlongTask(DtSimMessage * msg);
120 
126  virtual bool createPSR();
127 
135  virtual DtIteratorDirection initialTraversalDirection(
136  const DtString& routeName, const DtVector& initialWorldPosition) const;
137 
146  virtual void sendMoveAlongToSelf(const DtString& routeName,
147  enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
148 
149 private:
150 
153 
156 
157 protected:
158 
162 };

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)