VR-Forces 4.10 Class Documentation
 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  DtVrfObject* owner,
46  DtSimManager* 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  DtVrfObject* owner,
79  DtSimManager* 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:222
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Definition: formationState.h:38
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:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
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
class DtVrfObjectManager:
Definition: vrfObjectManager.h:202
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:31
DtHumanPatrolPSR * myProcessState
Container for state data associated with this component.
Definition: humanPatrolController.h:155
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtPatrolAlongState
Definition: humanPatrolController.h:36
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)