59 virtual bool init()
override;
62 virtual const char*
type()
const override;
65 virtual void tick()
override;
71 static void moveToCallback(
DtSimMessage * msg,
void * usr);
77 static void setLocationCallback(
DtSimMessage* msg,
void* usr);
83 static void moveToLocationCallback(
DtSimMessage * msg,
void * usr);
85 static void moveToDestinationCallback(
DtSimMessage* msg,
void* usr);
91 static void modifyVrfObjectCallback(
DtSimMessage* msg,
void* usr);
100 virtual void processMoveToLocationTask(
DtSimMessage * msg);
102 virtual void processMoveToDestinationTask(
DtSimMessage* msg);
108 virtual void processDestinationChanged();
113 virtual bool setupDestination();
123 virtual void setupDestinationVector()
const;
126 virtual void invalidateDestinationVector()
const;
136 virtual bool atDestination();
139 virtual void doMoving();
142 virtual double findDesiredHeading();
145 virtual double findDesiredSpeed();
148 virtual void moveToDestination();
152 virtual void stop(
bool success);
177 virtual bool createPSR();
179 virtual double distanceToDestination()
const;
185 virtual bool destinationIsInsideObstruction(
186 const DtVector& localDestination)
const;
196 virtual double atDistance()
const;
199 virtual bool usingNavBot()
const;
202 virtual void useNavBotData();
206 virtual unsigned maxNumFailedPathAttempts()
const;
210 virtual bool findAlternateDestination();
213 virtual void setStuck(
bool yesNo);
215 virtual double stuckTime();
217 static void navAreaChangedCallback(
void* usr);
218 virtual void processNavAreaChanged();
234 static void setAiEnabledCallback(
DtSimMessage* msg,
void* usrData);
237 virtual void processNavigationInterfaceChanged();
240 virtual void processEstimatedTotCalculation();
243 template<
typename T_Task>
246 myOverrideAtDistance = task.isAtDistanceSpecified();
247 if (myOverrideAtDistance)
249 myOverrideAtDistanceValue = task.atDistance();
251 myOverrideSpeed = task.isSpeedSpecified();
254 myOverrideSpeedValue = task.speed();
258 virtual bool currentPathEdge(
DtVector& pathEdgeStart,
DtVector& pathEdgeEnd)
const;
371 const double DtEstimatedTotCalcInterval = 5.0;
class DtHumanMoveToPSR:
Definition: humanMoveToPSR.h:29
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAnalogInputPort * myEtaForLastVertexInputPort
Input Port Name: eta-for-last-vertex Input Port Description: Specifies the eta for the last vertex of...
Definition: humanMoveToController.h:313
bool myIgnoreNavData
Definition: humanMoveToController.h:354
virtual void suspendTask()
This method is called when the currently running task is being suspended. The default implementation ...
DtHumanMovementControlOutputPortGroup * myHumanMovementControlOutputPortGroup
Output Group Name: movement-control .
Definition: humanMoveToController.h:278
DtHumanStateRepository * myHumanStateRepository
Definition: humanMoveToController.h:358
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:33
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:27
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void registerTaskMsgCallbacks()
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: humanMoveToController.h:378
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
DtVector myIntermediateLocalDestination
Definition: humanMoveToController.h:332
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
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
DtVector myLocalDestination
Definition: humanMoveToController.h:327
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Definition: humanMoveToController.h:382
bool myDestinationVectorIsValid
Definition: humanMoveToController.h:335
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:437
DtBooleanOutputPort * myUseCollisionAvoidancePort
Output Port Name: use-collision-avoidance Output Port Description: Indicates whether or not this cont...
Definition: humanMoveToController.h:299
virtual bool init() override
Calls setRadio()
DtHumanMoveToPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: humanMoveToController.h:362
DtVectorInputPort * myLastVertexLocationInputPort
Input Port Name: last-vertex-location Input Port Description: Specifies the last vertex location of t...
Definition: humanMoveToController.h:307
void registerDtHumanMoveToController(DtCgf *cgf)
Registers component and associated classes with the factories. Call after DtVrfApp::init() ...
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: humanMoveToController.h:374
DtInputPortGroup * myCollisionAvoidancePortGroup
Input Port Group Name: collision-avoidance-control Input Port Group Description:
Definition: humanMoveToController.h:275
DtVector myIntermediateWorldDestination
Definition: humanMoveToController.h:331
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
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
DtAnalogOutputPort * myEtaToLastVertexOutputPort
Output Port Name: eta-to-last-vertex Output Port Description: Specifies the eta to reach the last ver...
Definition: humanMoveToController.h:319
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtActiveBotNavInterface * myNavInterface
Definition: humanMoveToController.h:366
DtVectorOutputPort * myDestinationOutputPort
Output Port Name: destination Output Port Description: Specifies the current destination of the entit...
Definition: humanMoveToController.h:285
DtCollisionInputPort * myCollisionAvoidancePort
Input Port Name: potential-collision-info Input Port Description: information about an impending pote...
Definition: humanMoveToController.h:271
double myDistanceSquared
Definition: humanMoveToController.h:338
DtVector myWorldDestination
Definition: humanMoveToController.h:328
DtHumanMoveToControllerDescriptor; descriptor for the DtHumanMoveToControllerDescriptor component...
Definition: humanMoveToControllerDescriptor.h:23
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
bool myOverrideAtDistance
Definition: humanMoveToController.h:340
virtual bool decideToGiveUpTask() const
This function is used to determine if the controller should give up trying to execute the current tas...
double myEstimatedTotValue
the tot value
Definition: humanMoveToController.h:376
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
DtSimObjectReference myControlPoint
This is looked up once per tick - assumed unchanging while we have control.
Definition: humanMoveToController.h:325
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtBooleanOutputPort * myIsMovingPort
Output Port Name: is-moving Output Port Description: Indicates the entity is being actively moved by ...
Definition: humanMoveToController.h:292
DtHumanMoveToControllerDescriptor * myHumanMoveToControllerDescriptor
Definition: humanMoveToController.h:365
bool myAtDestination
Definition: humanMoveToController.h:337
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtHumanMoveToController is a controller that models movement to a <location> or <waypoint> for indivi...
Definition: humanMoveToController.h:42
A DtVrfProcessStateRepository subclass that keeps an arbitrary key/value pair set of data...
Definition: genericPsr.h:17
unsigned myNumFailedPathAttempts
Definition: humanMoveToController.h:356
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
An output port group that contains the ports necessary to control the movement of a human using the D...
Definition: humanMovementControlOutputPortGroup.h:22
bool myHasIntermediateDestination
Definition: humanMoveToController.h:330
bool myAIEnabled
Definition: humanMoveToController.h:368
The top level class of a VR-Forces Simulation Engine, representing a Computer Generated Forces instan...
Definition: cgf.h:147
DtVector myEstimatedTotTextPos
tot text position
Definition: humanMoveToController.h:380
void setCommonTaskParams(const T_Task &task)
Template function to handle a number of tasks that all have a common set of parameters.
Definition: humanMoveToController.h:244
DtVector myDestinationVector
Definition: humanMoveToController.h:334
double myOverrideAtDistanceValue
Definition: humanMoveToController.h:341
bool myOverrideSpeed
Definition: humanMoveToController.h:342
double myOverrideSpeedValue
Definition: humanMoveToController.h:343
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