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

DtFixedWingFollowEntityController is a controller that models follow behavior for fixed-wing entities. More...

Inheritance diagram for DtFixedWingFollowEntityController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtFixedWingFollowEntityController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtFixedWingFollowEntityController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 Overrides this to set up the control point before every frame.
virtual void doMoving ()
 Override these so the task doesn't end when we get near/at the desired position.
virtual void doFlying ()
 Determines if the entity is five seconds or fewer away from being at the waypoint using the entity’s speed and myDistanceSquared.
virtual void doTaxiing ()
 Determines if the entity is near its goal.
virtual void processFollowEntityTask (DtSimMessage *msg)
virtual const DtStringentityToFollow () const
virtual void setEntityToFollow (const DtString &entity)
virtual const DtVectoroffsetVector () const
virtual void setOffsetVector (const DtVector &offsets)

Static Public Member Functions

static void followEntityCallback (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 move-to tasks.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

 DtFixedWingFollowEntityController ()
 Default constructor; should not be called.
 DtFixedWingFollowEntityController (const DtFixedWingFollowEntityController &orig)
 copy constructor; shallow; does not copy the ports.
const
DtFixedWingFollowEntityController
operator= (const DtFixedWingFollowEntityController &orig)
 assignment operator; see comments on copy constructor!
virtual void registerTaskMsgCallbacks ()
 Overrides this so it can register it's interest in followEntity commands.
virtual bool setupControlPoint ()
 Sets up initial information for where the fixed wing wants to move to.
virtual double findDesiredSpeed ()
 This function returns the appropriate speed for the movement status of the FWE.

Protected Attributes

DtVrfObjectmyEntityPointer
 Set fresh each frame by setupControlPoint.
DtVrfObjectmyWorkingControlPoint
 Locally allocated waypoint - we set myControlPoint to point to it.

Detailed Description

DtFixedWingFollowEntityController is a controller that models follow behavior for fixed-wing entities.

Developer Description: Each simulation frame the control point to which the entity moves is recalculated to be in the right place with respect to the followed entity.

Uses Descriptor Type: DtFixedWingFollowEntityControllerDescriptor


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

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:
DtFixedWingFollowEntityControllerType

Reimplemented from DtFixedWingMoveToController.

virtual void DtFixedWingFollowEntityController::tick ( ) [virtual]

Overrides this to set up the control point before every frame.

This is so the entity follows correctly. Relies on DtFixedWingMoveToContoller::tick for to perform the actual tick.

Reimplemented from DtFixedWingMoveToController.

virtual void DtFixedWingFollowEntityController::doMoving ( ) [virtual]

Override these so the task doesn't end when we get near/at the desired position.

Reimplemented from DtFixedWingMoveToController.

virtual void DtFixedWingFollowEntityController::doFlying ( ) [virtual]

Determines if the entity is five seconds or fewer away from being at the waypoint using the entity’s speed and myDistanceSquared.

If it is, it sets the myFinishing flag to true; The myProcessState->lastDistanceSquared() is set to myDistanceSquared. otherwise, it calls the flyTo() function provided by its parent class.

Reimplemented from DtFixedWingMoveToController.

Determines if the entity is near its goal.

If it is, it sets the finishing flag to true. The myProcessState->lastDistanceSquared() is set to myDistanceSquared. Otherwise, it calls the taxiTo() function provided by its parent class.

Reimplemented from DtFixedWingMoveToController.

static void DtFixedWingFollowEntityController::followEntityCallback ( 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 move-to tasks.

virtual const DtString& DtFixedWingFollowEntityController::entityToFollow ( ) const [virtual]
virtual void DtFixedWingFollowEntityController::setEntityToFollow ( const DtString entity) [virtual]
virtual const DtVector& DtFixedWingFollowEntityController::offsetVector ( ) const [virtual]
virtual void DtFixedWingFollowEntityController::setOffsetVector ( const DtVector offsets) [virtual]
static DtSimComponent* DtFixedWingFollowEntityController::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 DtFixedWingMoveToController.

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

assignment operator; see comments on copy constructor!

virtual void DtFixedWingFollowEntityController::registerTaskMsgCallbacks ( ) [protected, virtual]

Overrides this so it can register it's interest in followEntity commands.

Reimplemented from DtFixedWingMoveToController.

Sets up initial information for where the fixed wing wants to move to.

Must call setMovementStatusFromControlPoint() after setting initial conditions

Reimplemented from DtFixedWingMoveToController.

virtual double DtFixedWingFollowEntityController::findDesiredSpeed ( ) [protected, virtual]

This function returns the appropriate speed for the movement status of the FWE.

The desired speed can change between flying, taxiing, taking off...

Reimplemented from DtFixedWingMoveToController.


Member Data Documentation

Set fresh each frame by setupControlPoint.

Locally allocated waypoint - we set myControlPoint to point to it.

Reimplemented from DtFixedWingMoveToController.


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)