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

Public Member Functions | |
| DtRotaryWingMoveAlongControllerComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingMoveAlongControllerComponent () |
| destructor | |
| virtual bool | init () |
| Creates the route state. | |
| virtual void | tick () |
| Calculate new control values. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | processMoveAlongTask (DtSimMessage *msg) |
| Extracts the route name and calculates the starting point from the task message. | |
| virtual void | registerTaskMsgCallbacks () |
| Overrides this so it can register its interest in MoveAlong commands. | |
| virtual void | processRouteChanged (DtVrfObject *obj) |
| virtual bool | setupRoute () |
| Looks up the route using the route name. | |
| virtual bool | isMovingToward (const DtVector &ENUpoint) |
| Returns true if the entity is moving toward ENUpoint, otherwise it returns false. | |
| virtual void | routeLogic () |
| Sets control values based on status along the route. | |
| virtual void | desiredVelocityAndPosition () |
| Calculates the desired position and velocity vectors that guide the helicopter along the route. | |
Static Public Member Functions | |
| static void | moveAlongCallback (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-along tasks. | |
| static void | routeChangedCallback (DtVrfObject *obj, void *usr) |
| Code to adjust behavior when the route changes. | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| DtRotaryWingMoveAlongControllerComponent () | |
| default constructor - should not be called | |
| DtRotaryWingMoveAlongControllerComponent (const DtRotaryWingMoveAlongControllerComponent &orig) | |
| copy constructor | |
| DtRotaryWingMoveAlongControllerComponent & | operator= (const DtRotaryWingMoveAlongControllerComponent &orig) |
| assignment operator | |
| virtual void | pilotProperties () |
| Sets the pilot properties. | |
| virtual void | buildLocalRoute () |
| builds the local copy of the route by copying myRoute's vertices to my local storage in process state repository: myVertices. | |
| virtual void | emptyVertexList () |
| removes and deletes vertices from the vertex list in process state repository (calls process state repository's emptyRouteVertices()). | |
Protected Attributes | |
| double | myDistanceSquared |
| DtVrfObject * | myRoute |
| This is looked up once per tick - assumed unchanging while we have control. | |
| bool | myRouteHasChanged |
| bool | myVerticesChangedCallbackRegistered |
DtRotaryWingMoveAlongControllerComponent is a controller used to model the movement of a helicopter along a route.
Uses Descriptor Type: DtRotaryWingPilotDescriptor
| DtRotaryWingMoveAlongControllerComponent::DtRotaryWingMoveAlongControllerComponent | ( | 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 DtRotaryWingMoveAlongControllerComponent::~DtRotaryWingMoveAlongControllerComponent | ( | ) | [virtual] |
destructor
default constructor - should not be called
| DtRotaryWingMoveAlongControllerComponent::DtRotaryWingMoveAlongControllerComponent | ( | const DtRotaryWingMoveAlongControllerComponent & | orig | ) | [protected] |
copy constructor
| virtual bool DtRotaryWingMoveAlongControllerComponent::init | ( | ) | [virtual] |
Creates the route state.
Reimplemented from DtRotaryWingTaskController.
| virtual void DtRotaryWingMoveAlongControllerComponent::tick | ( | ) | [virtual] |
Calculate new control values.
Reimplemented from DtSimComponent.
| virtual DtString DtRotaryWingMoveAlongControllerComponent::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 DtRotaryWingPatrolRouteController.
| static void DtRotaryWingMoveAlongControllerComponent::moveAlongCallback | ( | 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-along tasks.
| virtual void DtRotaryWingMoveAlongControllerComponent::processMoveAlongTask | ( | DtSimMessage * | msg | ) | [virtual] |
Extracts the route name and calculates the starting point from the task message.
| virtual void DtRotaryWingMoveAlongControllerComponent::registerTaskMsgCallbacks | ( | ) | [virtual] |
Overrides this so it can register its interest in MoveAlong commands.
Reimplemented from DtTaskControllerComponent.
Reimplemented in DtRotaryWingPatrolRouteController.
| static void DtRotaryWingMoveAlongControllerComponent::routeChangedCallback | ( | DtVrfObject * | obj, |
| void * | usr | ||
| ) | [static] |
Code to adjust behavior when the route changes.
| virtual void DtRotaryWingMoveAlongControllerComponent::processRouteChanged | ( | DtVrfObject * | obj | ) | [virtual] |
| static DtSimComponent* DtRotaryWingMoveAlongControllerComponent::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 DtRotaryWingPatrolRouteController.
| virtual bool DtRotaryWingMoveAlongControllerComponent::setupRoute | ( | ) | [virtual] |
Looks up the route using the route name.
| virtual bool DtRotaryWingMoveAlongControllerComponent::isMovingToward | ( | const DtVector & | ENUpoint | ) | [virtual] |
Returns true if the entity is moving toward ENUpoint, otherwise it returns false.
| virtual void DtRotaryWingMoveAlongControllerComponent::routeLogic | ( | ) | [virtual] |
Sets control values based on status along the route.
Reimplemented in DtRotaryWingPatrolRouteController.
| virtual void DtRotaryWingMoveAlongControllerComponent::desiredVelocityAndPosition | ( | ) | [virtual] |
Calculates the desired position and velocity vectors that guide the helicopter along the route.
| DtRotaryWingMoveAlongControllerComponent& DtRotaryWingMoveAlongControllerComponent::operator= | ( | const DtRotaryWingMoveAlongControllerComponent & | orig | ) | [protected] |
assignment operator
| virtual void DtRotaryWingMoveAlongControllerComponent::pilotProperties | ( | ) | [protected, virtual] |
Sets the pilot properties.
Overridden here so that the behavior can change depending on whether or not the current route point is the last one. Sets the appropriate properties for the wait controller. If the current waypoint is a route endpoint: The position selector is 1.0 The velocity selector is 0.0 The acceleration selector is 0.0 The heading selector is 0.0. If the current waypoint is not a route endpoint: The position selector is 0.0 The velocity selector is 1.0 The acceleration selector is 0.0 The heading selector is 0.0. In either case, the aggressiveness value is set to the default aggressiveness.
| virtual void DtRotaryWingMoveAlongControllerComponent::buildLocalRoute | ( | ) | [protected, virtual] |
builds the local copy of the route by copying myRoute's vertices to my local storage in process state repository: myVertices.
(calls process state repository's setRouteVertices()).
| virtual void DtRotaryWingMoveAlongControllerComponent::emptyVertexList | ( | ) | [protected, virtual] |
removes and deletes vertices from the vertex list in process state repository (calls process state repository's emptyRouteVertices()).
double DtRotaryWingMoveAlongControllerComponent::myDistanceSquared [protected] |
This is looked up once per tick - assumed unchanging while we have control.