![]() |
VR-Forces 4.0.4 Class Documentation
|
DtRotaryWingFollowEntityController is a controller component that models following behavior for rotary-wing entities. More...

Public Member Functions | |
| DtRotaryWingFollowEntityController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingFollowEntityController () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | processFollowEntityTask (DtSimMessage *msg) |
| Extracts the entity to follow and the desired offset vector from the task message. | |
| virtual const DtString & | entityToFollow () const |
| Get/set the entity to follow. | |
| virtual void | setEntityToFollow (const DtString &entity) |
| virtual const DtVector & | offsetVector () const |
| Get/set the offset vector from the entity's reference frame center to the follow point. | |
| 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 | |
| DtRotaryWingFollowEntityController () | |
| Default constructor; should not be called. | |
| DtRotaryWingFollowEntityController (const DtRotaryWingFollowEntityController &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtRotaryWingFollowEntityController & | operator= (const DtRotaryWingFollowEntityController &orig) |
| assignment operator; see comments on copy constructor! | |
| virtual void | registerTaskMsgCallbacks () |
| Overrides this so it can register its interest in followEntity commands. | |
| virtual void | tick () |
| Sets the desired velocity to the velocity of the entity to follow and sets the desired position to the position of the entity to follow plus the offset vector. | |
| virtual void | stop () |
| Sets the desired position to the entity’s current position and sets the desired velocity to zero. | |
| virtual void | pilotProperties () |
| Sets the pilot properties. | |
Protected Attributes | |
| DtVrfObject * | myEntityPointer |
| Set fresh each frame by setupControlPoint. | |
DtRotaryWingFollowEntityController is a controller component that models following behavior for rotary-wing entities.
Developers Description: Each timestep, the control point to which the entity moves and the entity's desired velocity is recalculated from the position and velocity of the followed entity.
Uses Descriptor Type: DtRotaryWingPilotDescriptor
| DtRotaryWingFollowEntityController::DtRotaryWingFollowEntityController | ( | 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 DtRotaryWingFollowEntityController::~DtRotaryWingFollowEntityController | ( | ) | [virtual] |
destructor
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtRotaryWingFollowEntityController::DtRotaryWingFollowEntityController | ( | const DtRotaryWingFollowEntityController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual DtString DtRotaryWingFollowEntityController::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 DtRotaryWingMoveToControllerComponent.
| static void DtRotaryWingFollowEntityController::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 DtRotaryWingFollowEntityController::processFollowEntityTask | ( | DtSimMessage * | msg | ) | [virtual] |
Extracts the entity to follow and the desired offset vector from the task message.
| virtual const DtString& DtRotaryWingFollowEntityController::entityToFollow | ( | ) | const [virtual] |
Get/set the entity to follow.
| virtual void DtRotaryWingFollowEntityController::setEntityToFollow | ( | const DtString & | entity | ) | [virtual] |
| virtual const DtVector& DtRotaryWingFollowEntityController::offsetVector | ( | ) | const [virtual] |
Get/set the offset vector from the entity's reference frame center to the follow point.
| virtual void DtRotaryWingFollowEntityController::setOffsetVector | ( | const DtVector & | offsets | ) | [virtual] |
| static DtSimComponent* DtRotaryWingFollowEntityController::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 DtRotaryWingMoveToControllerComponent.
| const DtRotaryWingFollowEntityController& DtRotaryWingFollowEntityController::operator= | ( | const DtRotaryWingFollowEntityController & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
| virtual void DtRotaryWingFollowEntityController::registerTaskMsgCallbacks | ( | ) | [protected, virtual] |
Overrides this so it can register its interest in followEntity commands.
Reimplemented from DtRotaryWingMoveToControllerComponent.
| virtual void DtRotaryWingFollowEntityController::tick | ( | ) | [protected, virtual] |
Sets the desired velocity to the velocity of the entity to follow and sets the desired position to the position of the entity to follow plus the offset vector.
Reimplemented from DtRotaryWingMoveToControllerComponent.
| virtual void DtRotaryWingFollowEntityController::stop | ( | ) | [protected, virtual] |
Sets the desired position to the entity’s current position and sets the desired velocity to zero.
Reimplemented from DtRotaryWingMoveToControllerComponent.
| virtual void DtRotaryWingFollowEntityController::pilotProperties | ( | ) | [protected, virtual] |
Sets the pilot properties.
Overridden here so that the follower is a little more aggressive than the followee. Sets the appropriate properties for the wait controller: The position selector is 1.5 The velocity selector is 1.0 The acceleration selector is 0.0 The heading selector is 0.0. The aggressiveness value is set to the default aggressiveness.
Reimplemented from DtRotaryWingMoveToControllerComponent.
Set fresh each frame by setupControlPoint.