![]() |
VR-Forces 4.0.4 Class Documentation
|
DtFixedWingFollowEntityController is a controller that models follow behavior for fixed-wing entities. More...

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 DtString & | entityToFollow () const |
| virtual void | setEntityToFollow (const DtString &entity) |
| virtual const DtVector & | offsetVector () 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 DtSimComponent * | creator (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 | |
| DtVrfObject * | myEntityPointer |
| Set fresh each frame by setupControlPoint. | |
| DtVrfObject * | myWorkingControlPoint |
| Locally allocated waypoint - we set myControlPoint to point to it. | |
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
| DtFixedWingFollowEntityController::DtFixedWingFollowEntityController | ( | 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 DtFixedWingFollowEntityController::~DtFixedWingFollowEntityController | ( | ) | [virtual] |
destructor
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtFixedWingFollowEntityController::DtFixedWingFollowEntityController | ( | const DtFixedWingFollowEntityController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual DtString DtFixedWingFollowEntityController::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 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.
| virtual void DtFixedWingFollowEntityController::doTaxiing | ( | ) | [virtual] |
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 void DtFixedWingFollowEntityController::processFollowEntityTask | ( | DtSimMessage * | msg | ) | [virtual] |
| 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*,
| 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 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.
| virtual bool DtFixedWingFollowEntityController::setupControlPoint | ( | ) | [protected, virtual] |
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.
Set fresh each frame by setupControlPoint.
Locally allocated waypoint - we set myControlPoint to point to it.
Reimplemented from DtFixedWingMoveToController.