![]() |
VR-Forces 4.0.4 Class Documentation
|
DtGroundMoveToControllerComponent is a controller that models movement to a waypoint for ground entities. More...

Public Member Functions | |
| DtGroundMoveToControllerComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=NULL) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtGroundMoveToControllerComponent () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | processMoveToTask (DtSimMessage *msg) |
| virtual void | processDestinationChanged () |
| Ensures that the destination stored in the ProcessStateRepository is consistent with the location of the destination control point. | |
| virtual void | registerTaskMsgCallbacks () |
| Overridden to register interest in move to messages. | |
| virtual bool | setupDestination () |
| Look up the control point by name and set the myControlPoint member to point to it. | |
Static Public Member Functions | |
| static void | moveToCallback (DtSimMessage *msg, void *usr) |
| Instances of this component will register this callback with their own 'this' pointer as user data with the msg executive requesting notification of move-to tasks. | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Attributes | |
| DtVrfObject * | myControlPoint |
| This is looked up once per tick - assumed unchanging while we have control. | |
Private Member Functions | |
| DtGroundMoveToControllerComponent () | |
| Default constructor; should not be called. | |
| DtGroundMoveToControllerComponent (const DtGroundMoveToControllerComponent &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtGroundMoveToControllerComponent & | operator= (const DtGroundMoveToControllerComponent &orig) |
| assignment operator; see comments on copy constructor! | |
DtGroundMoveToControllerComponent is a controller that models movement to a waypoint for ground entities.
Developer Description: DtGroundMoveToControllerComponent is derived from the DtGroundMoveToDestinationControllerComponent and adds the ability to move towards a control point. It's responsibility is to ensure that the destination is always in sync with the control point, which includes responding to the appropriate messages.
Uses Descriptor Type: DtGroundMoveToDescriptor
| DtGroundMoveToControllerComponent::DtGroundMoveToControllerComponent | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = NULL, |
||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtGroundMoveToControllerComponent::~DtGroundMoveToControllerComponent | ( | ) | [virtual] |
destructor
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtGroundMoveToControllerComponent::DtGroundMoveToControllerComponent | ( | const DtGroundMoveToControllerComponent & | orig | ) | [private] |
copy constructor; shallow; does not copy the ports.
| virtual DtString DtGroundMoveToControllerComponent::type | ( | ) | const [virtual] |
Returns a string identifies the class type of component.
Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.
Reimplemented from DtGroundMoveToDestinationControllerComponent.
Reimplemented in DtGroundPatrolBetweenController.
| static void DtGroundMoveToControllerComponent::moveToCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Instances of this component will register this callback with their own 'this' pointer as user data with the msg executive requesting notification of move-to tasks.
| virtual void DtGroundMoveToControllerComponent::processMoveToTask | ( | DtSimMessage * | msg | ) | [virtual] |
Reimplemented in DerivedMoveToController.
| virtual void DtGroundMoveToControllerComponent::processDestinationChanged | ( | ) | [virtual] |
Ensures that the destination stored in the ProcessStateRepository is consistent with the location of the destination control point.
Intended to be called only when the position of the control point has changed.
| static DtSimComponent* DtGroundMoveToControllerComponent::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
Reimplemented from DtGroundMoveToDestinationControllerComponent.
Reimplemented in DtGroundPatrolBetweenController, and DerivedMoveToController.
| virtual void DtGroundMoveToControllerComponent::registerTaskMsgCallbacks | ( | ) | [virtual] |
Overridden to register interest in move to messages.
Reimplemented from DtGroundMoveToDestinationControllerComponent.
Reimplemented in DtGroundPatrolBetweenController.
| virtual bool DtGroundMoveToControllerComponent::setupDestination | ( | ) | [virtual] |
Look up the control point by name and set the myControlPoint member to point to it.
Detects changes in the target point using myControlPointLastLocation and calls processWaypointChanged().
Reimplemented from DtGroundMoveToDestinationControllerComponent.
| const DtGroundMoveToControllerComponent& DtGroundMoveToControllerComponent::operator= | ( | const DtGroundMoveToControllerComponent & | orig | ) | [private] |
assignment operator; see comments on copy constructor!
This is looked up once per tick - assumed unchanging while we have control.