![]() |
VR-Forces 4.0.4 Class Documentation
|
DtMissileDistractionController is a component that looks for objects that could potentially distract the missile. More...

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 DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual DtMissileDistractionPSR * | createPSR () |
| 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 |
| DtMissileDistractionPSR * | myProcessState |
| Container for state data associated with this component. | |
| DtMissileStateRepository * | myLocalSR |
| DtSpatialFilterEvaluator * | myTargetConeGeometryEvaluator |
| 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 | |
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.
default constructor; not implemented
| DtMissileDistractionController::DtMissileDistractionController | ( | const DtMissileDistractionController & | orig | ) | [private] |
copy constructor; not implemented
| DtMissileDistractionController::DtMissileDistractionController | ( | 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 DtMissileDistractionController::~DtMissileDistractionController | ( | ) | [virtual] |
destructor
| const DtMissileDistractionController& DtMissileDistractionController::operator= | ( | const DtMissileDistractionController & | orig | ) | [private] |
assignment operator; not implemented
| virtual bool DtMissileDistractionController::init | ( | ) | [virtual] |
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.
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*,
| 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 DtMissileDistractionPSR* DtMissileDistractionController::createPSR | ( | ) | [protected, virtual] |
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] |
| virtual bool DtMissileDistractionController::initTargetConeGeometry | ( | ) | [protected, virtual] |
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] |
| virtual bool DtMissileDistractionController::objectWithinTargetConeGeometry | ( | DtVrfObject * | object | ) | const [protected, virtual] |
| virtual bool DtMissileDistractionController::isMissileDistracted | ( | DtCounterMeasureDistractionEntry * | entry | ) | const [protected, virtual] |
const DtMissileDistractionControllerDescriptor* DtMissileDistractionController::myMissileDistractionControllerDescriptor [protected] |
Container for state data associated with this component.
This state is saved and restored as part of a scenario (or checkpoint).