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

DtMissileDistractionController is a component that looks for objects that could potentially distract the missile. More...

Inheritance diagram for DtMissileDistractionController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtMissileDistractionController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtMissileDistractionController ()
 destructor
virtual bool init ()
 Calls createPSR(), and initTargetConeGeometry().
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 Processes only if the simulation is not paused.

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

virtual DtMissileDistractionPSRcreatePSR ()
 Creates myProcessState data member, and adds it to our process state repository manager.
virtual const char * defaultPSRType () const
virtual bool initTargetConeGeometry ()
 Creates the geometry evaluator based on the target-cone-geometry entry in the descriptor, and the geometry evaluator factory.
virtual void setupGeometryForDetection ()
 Sets up the current target cone geometry evaluator with the current position and orientation of the missile.
virtual void setUpDistractingObjectsList ()
 Reads in the countermeasure types we are looking for from the descriptor and creates a search predicate that is passed to the vrfobjectmanager.
virtual DtVector localTargetConePosition () const
 Uses the front of the missile as the apex for the target cone Frustrum will start from this point and extend out from the missile.
virtual bool processObjects ()
 Checks detectability of each of the detectable objects.
virtual bool detectObject (DtVrfObject *object, DtCounterMeasureDistractionEntry *entry)
virtual bool objectWithinTargetConeGeometry (DtVrfObject *object) const
virtual bool isMissileDistracted (DtCounterMeasureDistractionEntry *entry) const

Protected Attributes

DtManagedObjectListConstPtr myDistractingObjectList
const
DtMissileDistractionControllerDescriptor
myMissileDistractionControllerDescriptor
DtMissileDistractionPSRmyProcessState
 Container for state data associated with this component.
DtMissileStateRepositorymyLocalSR
DtSpatialFilterEvaluatormyTargetConeGeometryEvaluator
DtVector myTargetConeApex

Private Member Functions

 DtMissileDistractionController ()
 default constructor; not implemented
 DtMissileDistractionController (const DtMissileDistractionController &orig)
 copy constructor; not implemented
const
DtMissileDistractionController
operator= (const DtMissileDistractionController &orig)
 assignment operator; not implemented

Detailed Description

DtMissileDistractionController is a component that looks for objects that could potentially distract the missile.

End User Description: Manages a filtered list of detectable countermeasures. Only looks for the types of counter measures specified in the descriptor. Checks if any are in the target cone of the missile, i.e. close enough to the target to confuse the missile. This target cone is configured in the descriptor and should define the cone within which the missile can redirect itself and still hit the new target. If within this cone will check if the signature of the counter measure is strong enough to confuse, and finally it will do a probability check to determine if in fact the missile will be confused and if so will reset the missile's target. Once the missile has changed targets it will stop looking since presumably the entity that launched the countermeasure has performed its evasive manuevers. This is configurable in the descriptor however. Default is to stop looking once fooled.

Uses Descriptor Type: DtMissileDistractionControllerDescriptor.


Constructor & Destructor Documentation

default constructor; not implemented

copy constructor; not implemented

DtMissileDistractionController::DtMissileDistractionController ( 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


Member Function Documentation

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

assignment operator; not implemented

Calls createPSR(), and initTargetConeGeometry().

This must be called after construction and before the controller is used on an entity.

Reimplemented from DtControllerComponent.

virtual DtString DtMissileDistractionController::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:
DtMissileDistractionControllerType

Reimplemented from DtControllerComponent.

virtual void DtMissileDistractionController::tick ( ) [virtual]

Processes only if the simulation is not paused.

Calls clearObjectRangeCache(). Calls setupGeometryForDetection() Calls processObjects().

Reimplemented from DtSimComponent.

static DtSimComponent* DtMissileDistractionController::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.

Creates myProcessState data member, and adds it to our process state repository manager.

Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.

virtual const char* DtMissileDistractionController::defaultPSRType ( ) const [protected, virtual]
Returns:
DtVrfMissileDistractionControllerProcessStateRepositoryType. Derived classes may override this to return their own default PSR type, if a different PSR type is desired.

Creates the geometry evaluator based on the target-cone-geometry entry in the descriptor, and the geometry evaluator factory.

Can use range, frustrum or both

virtual void DtMissileDistractionController::setupGeometryForDetection ( ) [protected, virtual]

Sets up the current target cone geometry evaluator with the current position and orientation of the missile.

Called once per detection cycle.

virtual void DtMissileDistractionController::setUpDistractingObjectsList ( ) [protected, virtual]

Reads in the countermeasure types we are looking for from the descriptor and creates a search predicate that is passed to the vrfobjectmanager.

It will then return a list of all the objects that match our predicate that exist in the simulation.

virtual DtVector DtMissileDistractionController::localTargetConePosition ( ) const [protected, virtual]

Uses the front of the missile as the apex for the target cone Frustrum will start from this point and extend out from the missile.

virtual bool DtMissileDistractionController::processObjects ( ) [protected, virtual]

Checks detectability of each of the detectable objects.

First checks if this object has already been check to see if it could distract the missile. The process state keeps a list of all the objects that have already been checked. If the object is on the list there's nothing more to be done. We move on to the next object. If it is not on the list, call detectObject. If the object is detected it will be then be checked to see if the object will distract the missile. If so we reset our missile's target to the object and set the process state's amDistracted parameter. Once the missile is distracted we don't need to keep checking. After the distraction check is made we add the object to the process state's verified checked list.

virtual bool DtMissileDistractionController::detectObject ( DtVrfObject object,
DtCounterMeasureDistractionEntry entry 
) [protected, virtual]
Returns:
true if the specified object should be detected by the sensor, when it has not been detected on the previous detection cycle. Deriving classes should override this to implement their own detection constraints. This implementation returns true if objectWithinSensorGeometry() returns true, and the entity meets the detectDestroyedObjects criteria.
virtual bool DtMissileDistractionController::objectWithinTargetConeGeometry ( DtVrfObject object) const [protected, virtual]
Returns:
true only if the specified object is within the defined geometry of the sensor. Uses the sensor geometry evaluator.

Member Data Documentation

Container for state data associated with this component.

This state is saved and restored as part of a scenario (or checkpoint).


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)