VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  DtLocalObject* owner,
46  DtSimulationServices* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
51  virtual ~DtHumanPatrolController();
52 
55  virtual const char* type() const;
56 
59  virtual bool init();
60 
62  virtual void registerTaskMsgCallbacks();
63 
64  static void patrolCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
65 
66  virtual DtSimTaskStatePtr currentTaskState() const;
67 
72  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
73 
77  static DtSimComponent * creator(const DtString& name,
78  DtLocalObject* owner,
79  DtSimulationServices* simManager,
80  DtComponentDescriptor* desc = 0,
81  DtReaderWriterRegistry* parentRegistry = 0);
82 
83 protected:
84  virtual void processPatrol(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
85 
90  virtual bool processPatrolTwoPointsTask(DtSimTask* task, DtSimTaskStatePtr taskStatePtr);
91 
95  virtual bool processPatrolAlongTask(DtSimTask* task, DtSimTaskStatePtr taskStatePtr);
96 
104  virtual void onTaskComplete(DtSimMessage * msg);
105 
113  virtual bool moveTo(const DtUUID& controlPoint);
114 
120  virtual bool createPSR();
121 
129  virtual DtIteratorDirection initialTraversalDirection(
130  const DtUUID& route, const DtVector& initialWorldPosition) const;
131 
140  virtual void sendMoveAlongToSelf(const DtUUID& route,
141  enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
142 
143 private:
144 
147 
150 
151 protected:
152 
156 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#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...
DtHumanPatrolController is a task controller responsible for executing DtPatrolAlongTasks in aggregat...
Definition: humanPatrolController.h:32
virtual bool init()
Calls setRadio()
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
class DtAggregatePatrolBetweenPSR:
Definition: humanPatrolPSR.h:23
DtIteratorDirection
Definition: iteratorBase.h:23
File: simMsg.h.
Definition: simMessage.h:35
virtual DtSimTaskStatePtr currentTaskState() const
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
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
DtHumanPatrolPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: humanPatrolController.h:155
DtPatrolAlongState
Definition: humanPatrolController.h:36
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 Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)