VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregatedPatrolController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtFormationState;
16 class DtVrfObjectManager;
17 
29 {
30 public:
31 
33  {
34  DtMovingAlongRoute = 0,
35  DtReversingDirection = 1
36  };
37 
41  DtLocalObject* owner,
42  DtSimulationServices* simManager,
43  DtComponentDescriptor* desc = 0,
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
48 
51  virtual const char* type() const;
52 
55  virtual bool init();
56 
58  virtual void registerTaskMsgCallbacks();
59 
60  static void patrolCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
61 
65 
70  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
71 
75  static DtSimComponent * creator(const DtString& name,
76  DtLocalObject* owner,
77  DtSimulationServices* simManager,
78  DtComponentDescriptor* desc = 0,
79  DtReaderWriterRegistry* parentRegistry = 0);
80 
81 protected:
82  virtual void processPatrol(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
83 
88  virtual void processPatrolTwoPointsTask(DtSimTask* task, DtSimTaskStatePtr taskStatePtr);
89 
97  virtual void onTaskComplete(DtSimMessage * msg);
98 
106  virtual bool moveTo(const DtUUID& controlPoint);
107 
111  virtual void processPatrolAlongTask(DtSimTask* task, DtSimTaskStatePtr taskStatePtr);
112 
118  virtual bool createPSR();
119 
127  virtual DtIteratorDirection initialTraversalDirection(
128  const DtUUID& route, const DtVector& initialWorldPosition) const;
129 
138  virtual void sendMoveAlongToSelf(const DtUUID& route,
139  enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
140 
141 private:
142 
145 
148 protected:
149 
153 };
154 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
class DtLocalObjectManager:
Definition: localObjectManager.h:151
Definition: formationState.h:41
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual bool init()
Calls setRadio()
DtPatrolAlongState
Definition: aggregatedPatrolController.h:32
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtIteratorDirection
Definition: iteratorBase.h:23
File: simMsg.h.
Definition: simMessage.h:35
DtAggregatedPatrolPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: aggregatedPatrolController.h:152
class DtAggregatePatrolBetweenPSR:
Definition: aggregatedPatrolPSR.h:20
virtual DtSimTaskStatePtr currentTaskState() const
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtAggregatedPatrolController is a task controller responsible for executing DtPatrolAlongTasks in agg...
Definition: aggregatedPatrolController.h:28
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)