VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
DtFixedWingDefaultController Class Reference

DtFixedWingDefaultController is a controller used to direct a fixed wing entity to loiter when it is in the air and not otherwise tasked. More...

Inheritance diagram for DtFixedWingDefaultController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtFixedWingDefaultController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtFixedWingDefaultController ()
 destructor
virtual bool init ()
 Initialization - Calls base init() and creates and initializes our waypoint.
virtual void tick ()
 Calculate new control values.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual double radius () const
 Sets/gets radius of circle in process state repository (myProcessState, a DtFixedWingFlightPSR).
virtual void setRadius (double radius)
virtual bool clockwise () const
 Sets/gets clockwise flag in process state repository (myProcessState, a DtFixedWingFlightPSR).
virtual void setClockwise (bool clockwise)
virtual DtVrfObjectwaypoint () const
 OBSOLETE - returns 0.
virtual bool postAddComponentsInit ()
 Override to initialize loiter clockwise flag and loiter radius parameters in process state repository with values from component descriptor.
virtual void processOrbitTask (DtSimMessage *msg)
 If the plane is not on the ground, this function will pull out the location, radius and direction of the orbit task and copy them into the process state repository.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
static void orbitTaskCallback (DtSimMessage *msg, void *usr)
 Calls processOrbitTask.

Protected Member Functions

virtual void registerTaskMsgCallbacks ()
 Overridden to register interest in orbit tasks.

Private Member Functions

 DtFixedWingDefaultController ()
 default constructor - should not be called.
 DtFixedWingDefaultController (const DtFixedWingDefaultController &orig)
 Copy constructor and assignment operator not implemented.
DtFixedWingDefaultControlleroperator= (const DtFixedWingDefaultController &orig)

Detailed Description

DtFixedWingDefaultController is a controller used to direct a fixed wing entity to loiter when it is in the air and not otherwise tasked.

It can also respond to orbit tasks.

End User Description: This controller is normally placed after all other controllers on the controller component list of fixed-wing entities. If no other controller has taken control of the fixed wing port group by the time this controller is ticked, it flies the entity in a circle. This controller will also respond to orbit tasks, which allows the user to specify the location, radius and direction of the orbit. This component is specified with a DtFixedWingDefaultControllerDescriptor on the controller list.

Uses Descriptor Type: DtFixedWingDefaultControllerDescriptor


Constructor & Destructor Documentation

DtFixedWingDefaultController::DtFixedWingDefaultController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(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 and assignment operator not implemented.


Member Function Documentation

Initialization - Calls base init() and creates and initializes our waypoint.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingDefaultController::tick ( ) [virtual]

Calculate new control values.

Reimplemented from DtFixedWingPilotController.

virtual DtString DtFixedWingDefaultController::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.

Returns:
DtFixedWingDefaultControllerType

Reimplemented from DtFixedWingPilotController.

virtual double DtFixedWingDefaultController::radius ( ) const [virtual]

Sets/gets radius of circle in process state repository (myProcessState, a DtFixedWingFlightPSR).

virtual void DtFixedWingDefaultController::setRadius ( double  radius) [virtual]
virtual bool DtFixedWingDefaultController::clockwise ( ) const [virtual]

Sets/gets clockwise flag in process state repository (myProcessState, a DtFixedWingFlightPSR).

virtual void DtFixedWingDefaultController::setClockwise ( bool  clockwise) [virtual]
static DtSimComponent* DtFixedWingDefaultController::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 DtFixedWingPilotController.

OBSOLETE - returns 0.

Set/get location of loiter circle from process state repository setLoiterCenter() and loiterCenter().

Override to initialize loiter clockwise flag and loiter radius parameters in process state repository with values from component descriptor.

Reimplemented from DtFixedWingPilotController.

static void DtFixedWingDefaultController::orbitTaskCallback ( DtSimMessage msg,
void *  usr 
) [static]

Calls processOrbitTask.

If the plane is not on the ground, this function will pull out the location, radius and direction of the orbit task and copy them into the process state repository.

virtual void DtFixedWingDefaultController::registerTaskMsgCallbacks ( ) [protected, virtual]

Overridden to register interest in orbit tasks.

Reimplemented from DtTaskControllerComponent.

DtFixedWingDefaultController& DtFixedWingDefaultController::operator= ( const DtFixedWingDefaultController orig) [private]

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)