![]() |
VR-Forces 4.0.4 Class Documentation
|
DtTurretScanController is a controller that models scanning of a sector by a turret. More...

Public Member Functions | |
| DtTurretScanController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtTurretScanController () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | init () |
| Calls setRadio() | |
| virtual void | tick () |
| Calculate new control values. | |
| virtual void | setScanRate (DtReal scanRate) |
| virtual DtReal | scanRate () const |
| virtual void | setMinimumScanWidth (DtReal scanWidth) |
| The minimum with (in radians) of the sector of responsibility within which the turret scan component will slew back and forth. | |
| virtual DtReal | minimumScanWidth () const |
| virtual void | setClockwise (bool clockwise) |
| virtual bool | clockwise () const |
| virtual void | setInSector (bool inSector) |
| virtual bool | inSector () const |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| DtTurretScanController () | |
| Default constructor; should not be called. | |
| DtTurretScanController (const DtTurretScanController &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtTurretScanController & | operator= (const DtTurretScanController &orig) |
| assignment operator; see comments on copy constructor! | |
Protected Attributes | |
| DtReal | myScanRate |
| DtReal | myMinimumScanWidth |
| bool | myInSectorFlag |
| const DtTurretScanComponentDescriptor * | myTurretScanDescriptor |
DtTurretScanController is a controller that models scanning of a sector by a turret.
End User Description: Scan-rate is a parameter (from the component descriptor). The controller looks at the individual local entity state value for current scan sector center, amount, and turret azimuth and generates slew values (-1. to 1.) to cause the turret to scan the specified area at the indicated rate.
Uses Descriptor Type: DtTurretScanComponentDescriptor
| DtTurretScanController::DtTurretScanController | ( | 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 DtTurretScanController::~DtTurretScanController | ( | ) | [virtual] |
destructor
| DtTurretScanController::DtTurretScanController | ( | ) | [protected] |
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtTurretScanController::DtTurretScanController | ( | const DtTurretScanController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual DtString DtTurretScanController::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.
Implements DtTurretSlewController.
| virtual bool DtTurretScanController::init | ( | ) | [virtual] |
Calls setRadio()
Reimplemented from DtTurretSlewController.
| virtual void DtTurretScanController::tick | ( | ) | [virtual] |
Calculate new control values.
Reimplemented from DtTurretSlewController.
| virtual void DtTurretScanController::setScanRate | ( | DtReal | scanRate | ) | [virtual] |
| virtual DtReal DtTurretScanController::scanRate | ( | ) | const [virtual] |
| virtual void DtTurretScanController::setMinimumScanWidth | ( | DtReal | scanWidth | ) | [virtual] |
The minimum with (in radians) of the sector of responsibility within which the turret scan component will slew back and forth.
In a smaller width, the turret will slew directly to the center of the SOR and remain there.
| virtual DtReal DtTurretScanController::minimumScanWidth | ( | ) | const [virtual] |
| virtual void DtTurretScanController::setClockwise | ( | bool | clockwise | ) | [virtual] |
| virtual bool DtTurretScanController::clockwise | ( | ) | const [virtual] |
| virtual void DtTurretScanController::setInSector | ( | bool | inSector | ) | [virtual] |
| virtual bool DtTurretScanController::inSector | ( | ) | const [virtual] |
| static DtSimComponent* DtTurretScanController::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). |
| const DtTurretScanController& DtTurretScanController::operator= | ( | const DtTurretScanController & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
DtReal DtTurretScanController::myScanRate [protected] |
DtReal DtTurretScanController::myMinimumScanWidth [protected] |
bool DtTurretScanController::myInSectorFlag [protected] |
const DtTurretScanComponentDescriptor* DtTurretScanController::myTurretScanDescriptor [protected] |