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

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

Inheritance diagram for DtRotaryWingMoveAlongControllerComponent:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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
DtRotaryWingMoveAlongControllerComponentoperator= (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
DtVrfObjectmyRoute
 This is looked up once per tick - assumed unchanging while we have control.
bool myRouteHasChanged
bool myVerticesChangedCallbackRegistered

Detailed Description

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

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

copy constructor


Member Function Documentation

Creates the route state.

Reimplemented from DtRotaryWingTaskController.

Calculate new control values.

Reimplemented from DtSimComponent.

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

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.

Extracts the route name and calculates the starting point from the task message.

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.

static DtSimComponent* DtRotaryWingMoveAlongControllerComponent::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 DtRotaryWingPatrolRouteController.

Looks up the route using the route name.

Returns true if the entity is moving toward ENUpoint, otherwise it returns false.

Sets control values based on status along the route.

Reimplemented in DtRotaryWingPatrolRouteController.

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()).


Member Data Documentation

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


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)