![]() |
VR-Forces 4.0.4 Class Documentation
|
DtFixedWingDefaultController is a controller used to direct a fixed wing entity to loiter when it is in the air and not otherwise tasked. More...

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 DtVrfObject * | waypoint () 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 DtSimComponent * | creator (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. | |
| DtFixedWingDefaultController & | operator= (const DtFixedWingDefaultController &orig) |
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
| DtFixedWingDefaultController::DtFixedWingDefaultController | ( | 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 DtFixedWingDefaultController::~DtFixedWingDefaultController | ( | ) | [virtual] |
destructor
default constructor - should not be called.
| DtFixedWingDefaultController::DtFixedWingDefaultController | ( | const DtFixedWingDefaultController & | orig | ) | [private] |
Copy constructor and assignment operator not implemented.
| virtual bool DtFixedWingDefaultController::init | ( | ) | [virtual] |
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.
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*,
| 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 from DtFixedWingPilotController.
| virtual DtVrfObject* DtFixedWingDefaultController::waypoint | ( | ) | const [virtual] |
OBSOLETE - returns 0.
Set/get location of loiter circle from process state repository setLoiterCenter() and loiterCenter().
| virtual bool DtFixedWingDefaultController::postAddComponentsInit | ( | ) | [virtual] |
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.
| virtual void DtFixedWingDefaultController::processOrbitTask | ( | DtSimMessage * | msg | ) | [virtual] |
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] |