VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions
DtFixedWingPatrolRouteController Class Reference

DtFixedWingPatrolRouteController is a controller that models movement along a route for fixed-wing entities. More...

Inheritance diagram for DtFixedWingPatrolRouteController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtFixedWingPatrolRouteController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtFixedWingPatrolRouteController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void doLanding ()
 Override this function to ensure that the entity taxiis to/back the touchdown point if it was the last point in the route in order to keep patrolling.
virtual void doFinishingForFlying ()
 Checks to see if the entity is within two seconds of being at the waypoint, or if the entity’s distance from the waypoint is greater than it was the previous frame (by comparing myProcessState->distanceSquared() to myProcessState->lastDistanceSquared()).
virtual void doFinishingForTaxiing ()
 Only called if the entity is near its goal.
virtual void processPatrolRouteTask (DtSimMessage *msg)
virtual void registerTaskMsgCallbacks ()
 Overrides this so it can register its interest in patrolRoute commands.

Static Public Member Functions

static void patrolRouteCallback (DtSimMessage *msg, void *usrData)
 Instances of this component will register this callback with their own 'this' pointer as user data with the msg executive requesting notification of patrol-route tasks.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

 DtFixedWingPatrolRouteController ()
 Default constructor; should not be called.
 DtFixedWingPatrolRouteController (const DtFixedWingPatrolRouteController &orig)
 copy constructor; shallow; does not copy the ports.
const
DtFixedWingPatrolRouteController
operator= (const DtFixedWingPatrolRouteController &orig)
 assignment operator; see comments on copy constructor!

Detailed Description

DtFixedWingPatrolRouteController is a controller that models movement along a route for fixed-wing entities.

End User Description: The route is followed until complete, then in reverse, then forward, etc., until the entity is retasked.

Uses Descriptor Type: DtFixedWingPilotControllerDescriptor


Constructor & Destructor Documentation

(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

Default constructor; should not be called.

Here because the compiler will generate an unprotected one otherwise.

copy constructor; shallow; does not copy the ports.


Member Function Documentation

virtual DtString DtFixedWingPatrolRouteController::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.

Returns:
DtFixedWingPatrolRouteControllerType

Reimplemented from DtFixedWingMoveAlongController.

virtual void DtFixedWingPatrolRouteController::doLanding ( ) [virtual]

Override this function to ensure that the entity taxiis to/back the touchdown point if it was the last point in the route in order to keep patrolling.

Reimplemented from DtFixedWingMoveAlongController.

Checks to see if the entity is within two seconds of being at the waypoint, or if the entity’s distance from the waypoint is greater than it was the previous frame (by comparing myProcessState->distanceSquared() to myProcessState->lastDistanceSquared()).

If so, all port values are set to 0.0, myFinishing is set to false, and taskComplete() is called. Otherwise, flyTo() is called, and myProcessState->lastDistanceSquared() is set to myDistanceSquared.

Reimplemented from DtFixedWingMoveAlongController.

Only called if the entity is near its goal.

Checks to see if the entity is at the goal or passed it. If so, then it stops. Otherwise, it continues to taxi, but at its approach speed if it has one.

Reimplemented from DtFixedWingMoveAlongController.

static void DtFixedWingPatrolRouteController::patrolRouteCallback ( DtSimMessage msg,
void *  usrData 
) [static]

Instances of this component will register this callback with their own 'this' pointer as user data with the msg executive requesting notification of patrol-route tasks.

Overrides this so it can register its interest in patrolRoute commands.

Reimplemented from DtFixedWingMoveAlongController.

static DtSimComponent* DtFixedWingPatrolRouteController::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 DtFixedWingMoveAlongController.

const DtFixedWingPatrolRouteController& DtFixedWingPatrolRouteController::operator= ( const DtFixedWingPatrolRouteController orig) [protected]

assignment operator; see comments on copy constructor!


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)