VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtSurfaceEntityMoveToLocationController Class Reference

//! DtSurfaceEntityMoveToLocationController is a controller that models the movement of a surface entity to a specific point. More...

Inheritance diagram for DtSurfaceEntityMoveToLocationController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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 &current) 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

Detailed Description

//! 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


Constructor & Destructor Documentation

default constructor; not implemented

copy constructor; not implemented

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor


Member Function Documentation

const DtSurfaceEntityMoveToLocationController& DtSurfaceEntityMoveToLocationController::operator= ( const DtSurfaceEntityMoveToLocationController orig) [private]

assignment operator; not implemented

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.

Returns:
DtSurfaceEntityMoveToLocationType

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.

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.

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*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

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.

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.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)