VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateFollowController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 
17 
20 class DtOutputPortGroup;
21 class DtAnalogOutputPort;
22 class DtVectorOutputPort;
24 
26 {
27 public:
31  DtLocalObject* owner,
32  DtSimulationServices* simManager,
33  DtComponentDescriptor* desc = 0,
34  DtReaderWriterRegistry* parentRegistry = 0);
35 
36  virtual ~DtAggregateFollowController();
37 
40  virtual const char* type() const;
41 
43  virtual bool init();
44 
46  virtual bool createPorts();
47 
49  virtual bool createPortGroups();
50 
52  virtual void tick();
53 
55  virtual double desiredHeading();
56 
58  virtual double desiredSpeed();
59 
63  static void followEntityCallback(DtSimMessage* msg, void* usrData);
64  virtual void processFollowEntityTask(DtSimMessage* msg);
65 
70  virtual DtUUID entityToFollow() const;
71  virtual void setEntityToFollow(const DtUUID& entity);
72 
74  virtual double followDistance() const;
75  virtual void setFollowDistance(double distance);
76 
78  virtual void registerTaskMsgCallbacks();
79 
81  virtual void clearTask();
82 
86  static DtSimComponent * creator(const DtString& name,
87  DtLocalObject* owner,
88  DtSimulationServices* simManager,
89  DtComponentDescriptor* desc = 0,
90  DtReaderWriterRegistry* parentRegistry = 0);
91 
92 protected:
96 
99 
108 
114 
119 
127 };
128 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtOutputPortGroup * myMovementControlPortGroup
Output Port Name: desired-speed Output Port Description: Output Port Range: Output Group Parent: mo...
Definition: aggregateFollowController.h:102
DtAnalogOutputPort * myMovementDirectionPort
Output Port Name: desired-movement-direction Output Port Description: Output Port Range: Output Gro...
Definition: aggregateFollowController.h:113
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtVectorOutputPort * myDestinationOutputPort
Output Port Name: destination Output Port Description: Specifies the current destination of the entit...
Definition: aggregateFollowController.h:125
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtAggregateFollowPSR * myProcessState
Definition: aggregateFollowController.h:94
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
DtAnalogOutputPort * myAltitudePort
Output Port Name: desired-altitude Output Port Description: Output Port Range: .
Definition: aggregateFollowController.h:118
virtual bool init()
Calls setRadio()
DtAnalogOutputPort * mySpeedPort
Output Port Name: desired-speed Output Port Description: Output Port Range: Output Group Parent: mo...
Definition: aggregateFollowController.h:107
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
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 void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtSimObjectReference myEntityToFollow
Set fresh each frame in setupDestination().
Definition: aggregateFollowController.h:98
Definition: aggregateFollowController.h:25
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
class DtAggregateFollowPSR:
Definition: aggregateFollowPSR.h:23
Definition: vrfAggregateStateRepository.h:20
DtVrfAggregateStateRepository * myTrueAggregateRepository
Definition: aggregateFollowController.h:93
DtAggregateFollowDescriptor * myFollowDescriptor
Definition: aggregateFollowController.h:95
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
DtAggregateFollowDescriptor; descriptor for the DtAggregateFollowController component.
Definition: aggregateFollowDescriptor.h:23

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)