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

DtRotaryWingFollowEntityController is a controller component that models following behavior for rotary-wing entities. More...

Inheritance diagram for DtRotaryWingFollowEntityController:
Inheritance graph
[legend]

List of all members.

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 DtStringentityToFollow () const
 Get/set the entity to follow.
virtual void setEntityToFollow (const DtString &entity)
virtual const DtVectoroffsetVector () 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 DtSimComponentcreator (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

DtVrfObjectmyEntityPointer
 Set fresh each frame by setupControlPoint.

Detailed Description

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


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

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

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.

Extracts the entity to follow and the desired offset vector from the task message.

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

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


Member Data Documentation

Set fresh each frame by setupControlPoint.


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)