VR-Forces 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() override;
52 
55  virtual const char* type() const override;
56 
59  virtual bool init() override;
60 
62  virtual void registerTaskMsgCallbacks() override;
63 
64  static void patrolCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
65 
66  virtual DtSimTaskStatePtr currentTaskState() const override;
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: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
class DtLocalObjectManager:
Definition: localObjectManager.h:157
Definition: formationState.h:40
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
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
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtHumanPatrolController is a task controller responsible for executing DtPatrolAlongTasks in aggregat...
Definition: humanPatrolController.h:32
class DtAggregatePatrolBetweenPSR:
Definition: humanPatrolPSR.h:23
virtual bool init() override
Calls setRadio()
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)