VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
disaggregatedMoveToController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
12 
13 class DtSimMessage;
14 class DtMoveToTask;
16 
31 {
32 public:
34  {
35  DtImplementAsMoveIntoFormation = 0,
37  DtCloseEnough
38  } DtSubtaskImplementation;
39 
43  DtLocalObject* owner,
44  DtSimulationServices* simManager,
45  DtComponentDescriptor* desc = 0,
46  DtReaderWriterRegistry* parentRegistry = 0);
47 
48  virtual ~DtDisaggregatedMoveToController() override;
49 
50  virtual void tick() override;
51 
54  virtual const char* type() const override;
55 
58  virtual void registerTaskMsgCallbacks() override;
59 
61  virtual void clearTask() override;
62 
66  static void moveToTaskCallback(DtSimMessage * msg, void * usr);
67 
69  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
70 
74  static DtSimComponent * creator(const DtString& name,
75  DtLocalObject* owner,
76  DtSimulationServices* simManager,
77  DtComponentDescriptor* desc = 0,
78  DtReaderWriterRegistry* parentRegistry = 0);
79 
80 protected:
81 
89  DtSubtaskImplementation chooseSubtaskImplementation(
90  const DtVector& geocDestination) const;
91 
98  virtual void moveIntoFormation(const DtVector& geocDestination);
99 
105  virtual void moveAlongRoute(const DtVector& geocDestination);
106 
114  virtual bool calcRouteStartingPoint(const DtVector& geocEndPoint,
115  DtVector& geocStartPoint) const;
116 
119  virtual DtString generateWorkingRouteName() const;
120 
123  virtual DtRwLocationReference originalDestination() const;
124 
126  virtual double originalTaskSpeed() const;
127 
130  virtual const DtSimTaskMessageType& originalTaskType() const;
131 
134  virtual bool publishFormationRoutes() const;
135 
137  virtual void onWaypointMoved();
138 
142  virtual void onMoveToTask(DtSimMessage * msg);
143 
147  virtual void onTaskComplete(DtSimMessage * msg);
148 
151  virtual void sendMoveAlongSubtask();
152 
154  virtual void startMoveToBehavior(const DtMoveToTask& moveToTask);
155 
157  virtual bool createPSR();
158 
159  virtual bool init() override;
160 
161  virtual void clearMovementRoute();
162 
163 protected:
167 
171  mutable bool myToggleGeneratedName = false;
172 
173 private:
174 
177 
180 };
181 
bool myFirstTick
Definition: disaggregatedMoveToController.h:165
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
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 is a process state repository for the DtAggregateMoveToController that stores the list of the uu...
Definition: aggregateMoveToPSR.h:25
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
Holds a position of some form. May be an absolute position, or a reference to another object...
Definition: rwLocationReference.h:25
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtMoveToTask represents a moveTo task for an entity to perform. It inherits read/writableness from Si...
Definition: moveToTask.h:38
DtSimObjectReference myGoalObject
Definition: disaggregatedMoveToController.h:164
Definition: readerWriterRegistry.h:39
virtual bool init() override
Calls setRadio()
Class DtDisaggregatedMoveToController is a task controller responsible for executing DtMoveToLocation...
Definition: disaggregatedMoveToController.h:30
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtAggregateMoveToPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: disaggregatedMoveToController.h:170
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Definition: disaggregatedMoveToController.h:166
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
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtSubtaskImplementation
Definition: disaggregatedMoveToController.h:33
Definition: disaggregatedMoveToController.h:36
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)