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

DtRotaryWingMoveToControllerComponent is a controller used to model the movement of a helicopter along a route to a waypoint. More...

Inheritance diagram for DtRotaryWingMoveToControllerComponent:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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

DtVrfObjectmyControlPoint
 This is looked up once per tick - assumed unchanging while we have control.
DtVrfObjectmyWorkingControlPoint
 Locally allocated waypoint - we set myControlPoint to point to it.

Detailed Description

DtRotaryWingMoveToControllerComponent is a controller used to model the movement of a helicopter along a route to a waypoint.

Uses Descriptor Type: DtRotaryWingPilotDescriptor


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

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.

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

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]

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.

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*,

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 in DtRotaryWingPatrolBetweenController, DtRotaryWingFollowEntityController, DtRotaryWingCollisionAvoidanceController, and DtRotaryWingMoveToLocationControllerComponent.

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

assignment operator; see comments on copy constructor!

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.


Member Data Documentation

This is looked up once per tick - assumed unchanging while we have control.

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


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)