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

DtTurretScanController is a controller that models scanning of a sector by a turret. More...

Inheritance diagram for DtTurretScanController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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 DtTurretScanControlleroperator= (const DtTurretScanController &orig)
 assignment operator; see comments on copy constructor!

Protected Attributes

DtReal myScanRate
DtReal myMinimumScanWidth
bool myInSectorFlag
const
DtTurretScanComponentDescriptor
myTurretScanDescriptor

Detailed Description

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


Constructor & Destructor Documentation

DtTurretScanController::DtTurretScanController ( 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.

Here because the compiler will generate an unprotected one otherwise.

copy constructor; shallow; does not copy the ports.


Member Function Documentation

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.

Returns:
DtTurretScanControllerType

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

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.
const DtTurretScanController& DtTurretScanController::operator= ( const DtTurretScanController orig) [protected]

assignment operator; see comments on copy constructor!


Member Data Documentation


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)