VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
groundLeadFormationController.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
21 
23 class DtVectorOutputPort;
24 
31 {
32 public:
33 
37  DtSimulationServices* simManager, DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0 );
38 
41 
44  virtual const char* type() const;
45 
47  virtual void endFollowInFormation(bool taskSuccess = true);
48 
50  virtual void registerTaskMsgCallbacks();
51 
54  virtual void clearTask();
55 
57  static void followInFormationCallback(DtSimMessage * msg, void * usr);
58 
65  virtual void doMoving();
66 
70  static DtSimComponent * creator(const DtString& name,
71  DtLocalObject* owner,
72  DtSimulationServices* simManager,
73  DtComponentDescriptor* desc = 0,
74  DtReaderWriterRegistry* parentRegistry = 0);
75 
77  virtual bool isLeaderCapable() const;
78 
81  virtual bool checkTaskEndCondition();
82 
83 protected:
85  virtual void processFollowInFormation(const DtTaskMessage& msg);
86 
91  virtual DtVector shiftLocationAlongRoute(double shiftDistance,
92  std::vector<DtVector> testRoute, DtVector initalLoc, int segmentIndex);
93 
95  virtual double headingTo(DtVector localDestination);
96 
98  virtual void updateTaskVisualizations();
99 
100 private:
101 
104 
107 
110 
111 protected:
112 
117 
118 };
DtGroundLeadFormationControllerComponent is a controller that models movement of a ground entity alon...
Definition: groundLeadFormationController.h:30
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void clearTask()
Calls endFollowInFormation and parent clearTask.
static void followInFormationCallback(DtSimMessage *msg, void *usr)
Calls processFollowInFormation.
File: lclVecIter.h.
Definition: localVectorIterator.h:25
virtual bool checkTaskEndCondition()
End the task and releases the throttle when at end of route.
virtual void endFollowInFormation(bool taskSuccess=true)
Calls endFollowInFormation and taskComplete.
DtGroundFollowInFormationControllerComponent & operator=(const DtGroundFollowInFormationControllerComponent &orig)
assignment operator
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtSimObjectReferenceList myFollowers
Definition: groundLeadFormationController.h:113
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
double myFormationWidth
Definition: groundLeadFormationController.h:115
virtual void updateTaskVisualizations()
Visualizes myTargetLocation.
DtGroundFollowInFormationControllerComponent is a controller that models movement of a ground entity ...
Definition: groundFollowInFormationController.h:31
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtSimObjectReference myMainRoute
Definition: groundLeadFormationController.h:114
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
virtual bool isLeaderCapable() const
True if the leader is still present and not destroyed or immobilized.
virtual void processFollowInFormation(const DtTaskMessage &msg)
Processes task msg. Stores task parameters.
virtual void doMoving()
Main movement logic. Moves forward along the route never backwards. If the target position is back al...
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:23
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
double myFormationLength
Definition: groundLeadFormationController.h:116
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
virtual void registerTaskMsgCallbacks()
Overrides this so it can register it&#39;s interest in DtFollowInFormationTaskType.
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)