![]() |
VR-Forces 4.0.4 Class Documentation
|
DtUnderFireDeterminationSensor is a sensor that provides, together with the fire manager, a simple under-fire determination model. More...

Public Member Functions | |
| DtUnderFireDeterminationSensor (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=NULL) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtUnderFireDeterminationSensor () |
| destructor Unregisters with the detonation manager. | |
| virtual bool | init () |
| Registers with the fire manager. | |
| virtual bool | determineUnderFire (const DtFireContext &fireContext) |
| When a fire context is received, from the fire manager, it is processed in order to determine if the entity is under fire. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | tick () |
| Checks to see if the flaming and smoking indicators should be turned off. | |
| virtual bool | tickWhileDestroyed () const |
| We want the tick to be ticked while destroyed so that dead entities can clear their under fire state. | |
Static Public Member Functions | |
| static bool | processFireCallback (const DtFireContext &fireContext, void *usr) |
| The fire manager uses this function to notify the sensor of when it needs to process a detonation for the entity. | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual bool | registerForFireNotifications () |
| Registers the entity to receive notification of appropriate fire interactions. | |
| virtual bool | unregisterForFireNotifications () |
| Unregisters the entity to receive notification of appropriate fire interactions. | |
| virtual void | setUnderFire (const DtFireContext &fireContext) |
| Sets the under fire and the "last time fired upon" in the state repository. | |
| virtual void | clearUnderFire () |
| Sets the under-fire state in the state repository to false. | |
| virtual bool | isRegisteredForFireNotifications () |
| Keep track of whether or not we have registered with the fire manager for notification of fire and detonations for under-fire processing. | |
| virtual void | setIsRegisteredForFireNotifications (bool yesOrNo) |
| Keep track of whether or not we have registered with the fire manager for notification of fire and detonations for under-fire processing. | |
Protected Attributes | |
| DtUnderFireDeterminationComponentDescriptor * | myUnderFireComponentDescriptor |
Private Member Functions | |
| DtUnderFireDeterminationSensor () | |
| Default constructor; not implemented. | |
| DtUnderFireDeterminationSensor (const DtUnderFireDeterminationSensor &orig) | |
| copy constructor; not implemented | |
| const DtUnderFireDeterminationSensor & | operator= (const DtUnderFireDeterminationSensor &orig) |
| assignment operator; not implemented | |
Private Attributes | |
| bool | myIsRegisteredForFireNotifications |
DtUnderFireDeterminationSensor is a sensor that provides, together with the fire manager, a simple under-fire determination model.
Developer Description: The under-fire determination sensor registers a callback with the fire manager to receive callbacks when appropriate fire interactions occur. If the fire context, containing the fire interaction and relevant details, specifies either the entity, or that a detonation occurred within the user specified range, then it determines that the entity is under fire.
Uses Descriptor Type: DtUnderFireDeterminationComponentDescriptor
| DtUnderFireDeterminationSensor::DtUnderFireDeterminationSensor | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = NULL, |
||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
(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 DtUnderFireDeterminationSensor::~DtUnderFireDeterminationSensor | ( | ) | [virtual] |
destructor Unregisters with the detonation manager.
Default constructor; not implemented.
| DtUnderFireDeterminationSensor::DtUnderFireDeterminationSensor | ( | const DtUnderFireDeterminationSensor & | orig | ) | [private] |
copy constructor; not implemented
| virtual bool DtUnderFireDeterminationSensor::init | ( | ) | [virtual] |
Registers with the fire manager.
Provides the fire manager a pointer to the component's entity and to the entity's global ID. Relies on the destructor and the setDestroyed callback for unregistering for fire notifications (from the fire manager).
Reimplemented from DtSimComponent.
| static bool DtUnderFireDeterminationSensor::processFireCallback | ( | const DtFireContext & | fireContext, |
| void * | usr | ||
| ) | [static] |
The fire manager uses this function to notify the sensor of when it needs to process a detonation for the entity.
| fireContext | The fire context to process |
| usr | A pointer to the under fire determination sensor that should process the detonation context. |
| virtual bool DtUnderFireDeterminationSensor::determineUnderFire | ( | const DtFireContext & | fireContext | ) | [virtual] |
When a fire context is received, from the fire manager, it is processed in order to determine if the entity is under fire.
Calls setUnderFire() when the entity is determined to be under fire.
| virtual DtString DtUnderFireDeterminationSensor::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 DtSimComponent.
| virtual void DtUnderFireDeterminationSensor::tick | ( | ) | [virtual] |
Checks to see if the flaming and smoking indicators should be turned off.
Reimplemented from DtSimComponent.
| virtual bool DtUnderFireDeterminationSensor::tickWhileDestroyed | ( | ) | const [virtual] |
We want the tick to be ticked while destroyed so that dead entities can clear their under fire state.
Reimplemented from DtSimComponent.
| static DtSimComponent* DtUnderFireDeterminationSensor::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 bool DtUnderFireDeterminationSensor::registerForFireNotifications | ( | ) | [protected, virtual] |
Registers the entity to receive notification of appropriate fire interactions.
| virtual bool DtUnderFireDeterminationSensor::unregisterForFireNotifications | ( | ) | [protected, virtual] |
Unregisters the entity to receive notification of appropriate fire interactions.
| virtual bool DtUnderFireDeterminationSensor::isRegisteredForFireNotifications | ( | ) | [protected, virtual] |
Keep track of whether or not we have registered with the fire manager for notification of fire and detonations for under-fire processing.
| virtual void DtUnderFireDeterminationSensor::setIsRegisteredForFireNotifications | ( | bool | yesOrNo | ) | [protected, virtual] |
Keep track of whether or not we have registered with the fire manager for notification of fire and detonations for under-fire processing.
| virtual void DtUnderFireDeterminationSensor::setUnderFire | ( | const DtFireContext & | fireContext | ) | [protected, virtual] |
Sets the under fire and the "last time fired upon" in the state repository.
| virtual void DtUnderFireDeterminationSensor::clearUnderFire | ( | ) | [protected, virtual] |
Sets the under-fire state in the state repository to false.
| const DtUnderFireDeterminationSensor& DtUnderFireDeterminationSensor::operator= | ( | const DtUnderFireDeterminationSensor & | orig | ) | [private] |
assignment operator; not implemented
DtUnderFireDeterminationComponentDescriptor* DtUnderFireDeterminationSensor::myUnderFireComponentDescriptor [protected] |