![]() |
VR-Forces 4.0.4 Class Documentation
|
DtRotaryWingMoveToControllerComponent is a controller used to model the movement of a helicopter along a route to a waypoint. More...

Public Member Functions | |
| DtRotaryWingMoveToControllerComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingMoveToControllerComponent () |
| destructor | |
| virtual void | tick () |
| Sets the desired position and velocity for use by the parent controller, then calls the parent's tick() function. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | processMoveToTask (DtSimMessage *msg) |
| Extracts the name of the waypoint from the message, and calls setControlObjectName on myProcessState to store the value. | |
| virtual void | processMoveToAltitudeTask (DtSimMessage *msg) |
| Use information provided by the message to create a working control point at the desired altitude, using current position, and then set the control point to it. | |
Static Public Member Functions | |
| static void | moveToCallback (DtSimMessage *msg, void *usr) |
| 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 and move-to-altitude tasks. | |
| static void | moveToAltitudeCallback (DtSimMessage *msg, void *usr) |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual void | registerTaskMsgCallbacks () |
| Overrides this so it can register its interest in MoveTo commands. | |
| DtRotaryWingMoveToControllerComponent () | |
| Default constructor; should not be called. | |
| DtRotaryWingMoveToControllerComponent (const DtRotaryWingMoveToControllerComponent &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtRotaryWingMoveToControllerComponent & | operator= (const DtRotaryWingMoveToControllerComponent &orig) |
| assignment operator; see comments on copy constructor! | |
| virtual bool | setupControlPoint () |
| If the working control point is not null, sets the control point to be the working control point. | |
| virtual bool | createWorkingControlPoint (const DtVector location) |
| Creates a new "phantom" waypoint at the current location of the FWE, but at an altitude specified by the MoveToAltitude task. | |
| virtual void | stop () |
| Overidden by DtRotaryWindEmbarkationController. | |
| virtual void | pilotProperties () |
| Sets the appropriate properties for the wait controller: The position selector is 1.0 The velocity selector is 1.0 The acceleration selector is 0.0 The heading selector is 0.0. | |
| virtual void | getDesiredPosition (DtVector &desiredPosition) |
| Returns the position the helicopter wants to move to. | |
Protected Attributes | |
| DtVrfObject * | myControlPoint |
| This is looked up once per tick - assumed unchanging while we have control. | |
| DtVrfObject * | myWorkingControlPoint |
| Locally allocated waypoint - we set myControlPoint to point to it. | |
DtRotaryWingMoveToControllerComponent is a controller used to model the movement of a helicopter along a route to a waypoint.
Uses Descriptor Type: DtRotaryWingPilotDescriptor
| DtRotaryWingMoveToControllerComponent::DtRotaryWingMoveToControllerComponent | ( | 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 DtRotaryWingMoveToControllerComponent::~DtRotaryWingMoveToControllerComponent | ( | ) | [virtual] |
destructor
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtRotaryWingMoveToControllerComponent::DtRotaryWingMoveToControllerComponent | ( | const DtRotaryWingMoveToControllerComponent & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual void DtRotaryWingMoveToControllerComponent::tick | ( | ) | [virtual] |
Sets the desired position and velocity for use by the parent controller, then calls the parent's tick() function.
Reimplemented from DtSimComponent.
Reimplemented in DtRotaryWingFollowEntityController, DtRotaryWingPatrolBetweenController, and DtRotaryWingCollisionAvoidanceController.
| virtual DtString DtRotaryWingMoveToControllerComponent::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.
Implements DtRotaryWingTaskController.
Reimplemented in DtRotaryWingCollisionAvoidanceController, DtRotaryWingPatrolBetweenController, DtRotaryWingFollowEntityController, and DtRotaryWingMoveToLocationControllerComponent.
| static void DtRotaryWingMoveToControllerComponent::moveToCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [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 and move-to-altitude tasks.
| static void DtRotaryWingMoveToControllerComponent::moveToAltitudeCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| virtual void DtRotaryWingMoveToControllerComponent::processMoveToTask | ( | DtSimMessage * | msg | ) | [virtual] |
Extracts the name of the waypoint from the message, and calls setControlObjectName on myProcessState to store the value.
Deletes myWorkingControlPoint to clear out any previous data. Calls startTask.
| virtual void DtRotaryWingMoveToControllerComponent::processMoveToAltitudeTask | ( | DtSimMessage * | msg | ) | [virtual] |
Use information provided by the message to create a working control point at the desired altitude, using current position, and then set the control point to it.
| static DtSimComponent* DtRotaryWingMoveToControllerComponent::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 in DtRotaryWingPatrolBetweenController, DtRotaryWingFollowEntityController, DtRotaryWingCollisionAvoidanceController, and DtRotaryWingMoveToLocationControllerComponent.
| virtual void DtRotaryWingMoveToControllerComponent::registerTaskMsgCallbacks | ( | ) | [protected, virtual] |
Overrides this so it can register its interest in MoveTo commands.
Reimplemented from DtTaskControllerComponent.
Reimplemented in DtRotaryWingPatrolBetweenController, DtRotaryWingFollowEntityController, DtRotaryWingCollisionAvoidanceController, and DtRotaryWingMoveToLocationControllerComponent.
| const DtRotaryWingMoveToControllerComponent& DtRotaryWingMoveToControllerComponent::operator= | ( | const DtRotaryWingMoveToControllerComponent & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
| virtual bool DtRotaryWingMoveToControllerComponent::setupControlPoint | ( | ) | [protected, virtual] |
If the working control point is not null, sets the control point to be the working control point.
Otherwise, attempts to look up the control point using the control point name.
Reimplemented in DtRotaryWingMoveToLocationControllerComponent.
| virtual bool DtRotaryWingMoveToControllerComponent::createWorkingControlPoint | ( | const DtVector | location | ) | [protected, virtual] |
Creates a new "phantom" waypoint at the current location of the FWE, but at an altitude specified by the MoveToAltitude task.
It sets both myWorkingControlPoint and myControlPoint to the new control point. In order to ensure that the memory is cleaned up properly, myWorkingControlPoint is responsible for deleting the created CP.
| virtual void DtRotaryWingMoveToControllerComponent::stop | ( | ) | [protected, virtual] |
Overidden by DtRotaryWindEmbarkationController.
Reimplemented in DtRotaryWingFollowEntityController.
| virtual void DtRotaryWingMoveToControllerComponent::pilotProperties | ( | ) | [protected, virtual] |
Sets the appropriate properties for the wait controller: The position selector is 1.0 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 in DtRotaryWingFollowEntityController, and DtRotaryWingCollisionAvoidanceController.
| virtual void DtRotaryWingMoveToControllerComponent::getDesiredPosition | ( | DtVector & | desiredPosition | ) | [protected, virtual] |
Returns the position the helicopter wants to move to.
Reimplemented in DtRotaryWingMoveToLocationControllerComponent.
This is looked up once per tick - assumed unchanging while we have control.
Locally allocated waypoint - we set myControlPoint to point to it.