![]() |
VR-Forces 4.0.4 Class Documentation
|
//! DtSurfaceEntityMoveToLocationController is a controller that models the movement of a surface entity to a specific point. More...

Public Member Functions | |
| DtSurfaceEntityMoveToLocationController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtSurfaceEntityMoveToLocationController () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | processMoveToLocationTask (DtSimMessage *msg) |
| Retrieves the move to location from the task message. | |
| virtual void | registerTaskMsgCallbacks () |
| Registers interest in move to location tasks by calling addTaskProcessorCallback moveToLocationCallback as the function pointer, and the 'this' pointer as the user data. | |
Static Public Member Functions | |
| static void | moveToLocationCallback (DtSimMessage *msg, void *usr) |
| Called when a move to location message is received. | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual double | distanceSquaredToDestination2D (const DtVector ¤t) const |
| Returns distance squared from destination point to current location in local coordinates. | |
| virtual bool | setupControlPoint () |
| Overridden to specify a target location in the process state repository. | |
| virtual void | getLocalDestination (DtVector &local) const |
| Assigns myLocalAimingPoint to the given vector. | |
Protected Attributes | |
| DtVector | myWorldAimingPoint |
| DtVector | myLocalAimingPoint |
Private Member Functions | |
| DtSurfaceEntityMoveToLocationController () | |
| default constructor; not implemented | |
| DtSurfaceEntityMoveToLocationController (const DtSurfaceEntityMoveToController &orig) | |
| copy constructor; not implemented | |
| const DtSurfaceEntityMoveToLocationController & | operator= (const DtSurfaceEntityMoveToLocationController &orig) |
| assignment operator; not implemented | |
//! DtSurfaceEntityMoveToLocationController is a controller that models the movement of a surface entity to a specific point.
DtSurfaceEntityMoveToLocationController is a controller that models the movement of a surface entity to a specific point.
DtSurfaceEntityMoveToLocationController is derived from DtSurfaceEntityMoveToController. It changes the move to waypoint behavior to move to an arbitrary user-specified location by changing setupControlPoint() to maintain the world aiming point in the process state repository based on the user's input.
Uses Descriptor Type: DtSurfaceEntityPilotControllerDescriptor
default constructor; not implemented
| DtSurfaceEntityMoveToLocationController::DtSurfaceEntityMoveToLocationController | ( | const DtSurfaceEntityMoveToController & | orig | ) | [private] |
copy constructor; not implemented
| DtSurfaceEntityMoveToLocationController::DtSurfaceEntityMoveToLocationController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(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 DtSurfaceEntityMoveToLocationController::~DtSurfaceEntityMoveToLocationController | ( | ) | [virtual] |
destructor
| const DtSurfaceEntityMoveToLocationController& DtSurfaceEntityMoveToLocationController::operator= | ( | const DtSurfaceEntityMoveToLocationController & | orig | ) | [private] |
assignment operator; not implemented
| virtual DtString DtSurfaceEntityMoveToLocationController::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 DtSurfaceEntityMoveToController.
| static void DtSurfaceEntityMoveToLocationController::moveToLocationCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Called when a move to location message is received.
Instances of this component will register this callback (with their own 'this' pointer as user data) by calling addTaskProcessorCallback in registerTaskMsgCallbacks() in order to request for notification of move to location tasks. When this callback is activated, the user data pointer is cast to an instance of this class upon which processPatrolRouteTask is called with the patrol route task message.
| virtual void DtSurfaceEntityMoveToLocationController::processMoveToLocationTask | ( | DtSimMessage * | msg | ) | [virtual] |
Retrieves the move to location from the task message.
Called by moveToCallback. Sets the world aiming point in the process state repository based on the value specified in the message. Calls setupControlPoint and setupGoalVector.
| virtual void DtSurfaceEntityMoveToLocationController::registerTaskMsgCallbacks | ( | ) | [virtual] |
Registers interest in move to location tasks by calling addTaskProcessorCallback moveToLocationCallback as the function pointer, and the 'this' pointer as the user data.
Reimplemented from DtSurfaceEntityMoveToController.
| static DtSimComponent* DtSurfaceEntityMoveToLocationController::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 DtSurfaceEntityMoveToController.
| virtual double DtSurfaceEntityMoveToLocationController::distanceSquaredToDestination2D | ( | const DtVector & | current | ) | const [protected, virtual] |
Returns distance squared from destination point to current location in local coordinates.
Reimplemented from DtSurfaceEntityMoveToController.
| virtual bool DtSurfaceEntityMoveToLocationController::setupControlPoint | ( | ) | [protected, virtual] |
Overridden to specify a target location in the process state repository.
Synchronizes myWorldAimingPoint and myLocalAimingPoint with the value from the process state repository. Calls setupGoalVector with myLocalAimingPoint. Sets myControlPointLastLocation to myLocalAimingPoint.
Reimplemented from DtSurfaceEntityMoveToController.
| virtual void DtSurfaceEntityMoveToLocationController::getLocalDestination | ( | DtVector & | local | ) | const [protected, virtual] |
Assigns myLocalAimingPoint to the given vector.
Reimplemented from DtSurfaceEntityMoveToController.