VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
disaggregatedMoveIntoFormationController.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 
16 #include <matrix/vlVector.h>
17 #include <vector>
18 
20 class DtFormationState;
21 class DtSimMessage;
22 class DtSetDataManager;
23 class DtSetDataRequest;
27 
50 {
51 public:
52 
56  DtVrfObject* owner,
57  DtSimManager* simManager,
58  DtComponentDescriptor* desc = 0,
59  DtReaderWriterRegistry* parentRegistry = 0);
60 
62 
65  virtual const char* type() const;
66 
68  virtual bool init();
69 
71  virtual void tick();
72 
76  virtual void registerTaskMsgCallbacks();
77 
79  virtual void clearTask();
80 
83  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
84 
87  static void formationStateChanged(const DtFormationState& formationState,
88  void* usr);
89 
93  static DtSimComponent * creator(const DtString& name,
94  DtVrfObject* owner,
95  DtSimManager* simManager,
96  DtComponentDescriptor* desc = 0,
97  DtReaderWriterRegistry* parentRegistry = 0);
98 
101  static void moveIntoFormationTaskCallback(DtSimMessage * msg, void * usr);
102 
105  static void subordinateRemoved(const DtUUID& superior, const DtUUID& subordinate, void* usr);
106 
107 protected:
108 
115  virtual void moveIntoFormation(const DtVector& location, double heading, DtString formation);
116 
127  virtual void onTaskComplete(DtSimMessage * msg);
128 
133  virtual void onFormationStateChanged();
134 
136  virtual void sendRequestToSelf(const DtSetDataRequest& request) const;
137 
139  virtual void sendTaskToSubordinate(const DtSimTask& task,
140  const DtUUID& subordinate) const;
141 
143  void sendSetDataRequestToSubordinate(const DtSetDataRequest& request,
144  const DtUUID& subordinate) const;
145 
147  virtual void processMoveIntoFormationTask(DtSimMessage * msg);
148 
154  virtual bool createPSR();
155 
156  virtual void clearDebugWaypointNames();
157 
161  virtual void processSubordinateRemoved(const DtUUID& superior, const DtUUID& subordinate);
162 
165  virtual bool registerOrgNodeCallbacks();
166 
168  virtual void groundClampLocation(DtVector& location);
169 
172  virtual bool shouldGroundClamp() const;
173 
174 private:
175 
178 
181 
182 protected:
183 
188 
194 
198 
201  std::vector<DtString> myDebugWaypointNames;
202 
206 
210 
215 
220 
227 };
Class DtAggregateMoveIntoFormationDescriptor holds all of the readable/writeable parameters used to c...
Definition: aggregateMoveIntoFormationDescriptor.h:32
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
DtSetDataManager * mySetDataManager
Pointer to aggregate&#39;s DtSetDataManager, cached in this class for convenience.
Definition: disaggregatedMoveIntoFormationController.h:197
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
bool myRegisteredWithOrgNode
Flag used to indicate if the subordinateRemoved() callback has been registered with the aggregate&#39;s o...
Definition: disaggregatedMoveIntoFormationController.h:226
Definition: formationState.h:38
std::vector< DtString > myDebugWaypointNames
List of object names of waypoints, generated at target locations.
Definition: disaggregatedMoveIntoFormationController.h:201
Class DtAggregateMoveIntoFormationController is a task controller that models aggregate entity behavi...
Definition: disaggregatedMoveIntoFormationController.h:49
virtual void registerTaskMsgCallbacks()
This is a process state repository for the DtAggregateMoveToController that stores the list of the uu...
Definition: aggregateMoveToPSR.h:21
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.
virtual bool init()
Calls setRadio()
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
bool myTurnToHeadingUponArrival
Flag indicating whether or not subordinates should turn to given heading upon arrival at the destinat...
Definition: disaggregatedMoveIntoFormationController.h:219
DtString myFormation
Definition: disaggregatedMoveIntoFormationController.h:187
DtSetDataRequest is an abstract base class from which real setDataRequests can derive.
Definition: setDataRequest.h:40
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtAggregateMoveToPSR * myProcessState
Container for state data associated with this component.
Definition: disaggregatedMoveIntoFormationController.h:209
bool myStopMovingUponArrival
Flag indicating whether or not subordinates should stop upon arrival at destination.
Definition: disaggregatedMoveIntoFormationController.h:214
DtFormationState * myFormationState
Definition: disaggregatedMoveIntoFormationController.h:185
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
This class manages the distribution of DtSetDataRequests within a single DtVrfObject.
Definition: setDataManager.h:37
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:31
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
const DtAggregateMoveIntoFormationDescriptor * myAggregateMoveIntoFormationDescriptor
Definition: disaggregatedMoveIntoFormationController.h:184
DtVrfAggregateStateRepository * myAggregateStateRepository
Pointer to aggregate&#39;s state repository, cached in this class for convenience.
Definition: disaggregatedMoveIntoFormationController.h:205
Definition: vrfAggregateStateRepository.h:22
DtCompatibilityRadio.
Definition: compatibilityRadio.h:30
DtVector myLocation
Definition: disaggregatedMoveIntoFormationController.h:186
DtCompatibilityRadio * myCommandRadio
Pointer to aggregate&#39;s command radio, cached in this class for convenience.
Definition: disaggregatedMoveIntoFormationController.h:193

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)