![]() |
VR-Forces 4.0.4 Class Documentation
|
DtRadarObjectSensor extends the DtSignatureObjectSensor with the capability of publishing an emitter system. More...

Public Member Functions | |
| DtRadarObjectSensor (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRadarObjectSensor () |
| destructor | |
| virtual bool | init () |
| Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry(). | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual int | sensorType () const |
| Returns DtSensorTypeRadar. | |
| virtual void | tick () |
Turns on the emitter system in the first tick, as indicated in
myRadarSensorPSR. | |
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 bool | detectObject (DtVrfObject *object, DtRwSensorContactInfo *contactInfo) |
| Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off. | |
| virtual bool | continueDetectingObject (DtVrfObject *object, DtRwSensorContactInfo *contactInfo, bool &contactInfoModified) |
| Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off. | |
| virtual const char * | defaultPSRType () const |
| virtual void | createAndInitEmitterSystem () |
| Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem. | |
| virtual void | destroyEmitterSystem () |
| Removes the emitter system. | |
| virtual void | processSetEmitterRequestMessage (DtSimMessage *msg) |
| Calls setEmitterSystemOn() with the value specified in the message if the message matches our emitter system ID. | |
| virtual void | processSetRadarModeRequestMessage (DtSimMessage *msg) |
| virtual void | processRequestRadarModesAdmin (DtString receiver, DtString sender, bool isEchelonId, const DtVrfObjectMessage *msg) |
| virtual void | setEmitterSystemOn (bool onOff) |
| Changes the on/off state of myEmitterSystem, and changes the emitter system on value in the PSR. | |
Static Protected Member Functions | |
| static void | setEmitterRequestCallback (DtSimMessage *msg, void *usrData) |
| Static callback method for setEmitter messages. | |
| static void | setRadarModeRequestCallback (DtSimMessage *msg, void *usrData) |
| static void | requestRadarModesAdminCallback (const DtVrfObjectMessage *msg, void *usr) |
Protected Attributes | |
| const DtRadarObjectSensorDescriptor * | myRadarObjectSensorDescriptor |
| DtVrfEmitterSystem * | myEmitterSystem |
| DtRadarObjectSensorPSR * | myRadarSensorPSR |
| DtObjectSensor's myProcessState cast to our PSR type. | |
| bool | myFirstTick |
| Flag for knowing the first tick of this component. Needed to initialize from PSR. | |
| DtU8 | myEmitterSystemId |
Private Member Functions | |
| DtRadarObjectSensor () | |
| default constructor; not implemented | |
| DtRadarObjectSensor (const DtRadarObjectSensor &orig) | |
| copy constructor; not implemented | |
| const DtRadarObjectSensor & | operator= (const DtRadarObjectSensor &orig) |
| assignment operator; not implemented | |
DtRadarObjectSensor extends the DtSignatureObjectSensor with the capability of publishing an emitter system.
End User Description: This sensor has all the functionality of the DtSignatureObjectSensor, but additionally publishes an emitter system to the network. The sensing functionality is exactly the same as the DtSignatureObjectSensor. The emitter system can be toggled on and off using DtSetEmitter messages, which are accessible in the GUI. When the emitter system is toggled off, the sensor will no longer detect any objects.
Uses Descriptor Type: DtRadarObjectSensorDescriptor
| DtRadarObjectSensor::DtRadarObjectSensor | ( | ) | [private] |
default constructor; not implemented
| DtRadarObjectSensor::DtRadarObjectSensor | ( | const DtRadarObjectSensor & | orig | ) | [private] |
copy constructor; not implemented
| DtRadarObjectSensor::DtRadarObjectSensor | ( | 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 DtRadarObjectSensor::~DtRadarObjectSensor | ( | ) | [virtual] |
destructor
| const DtRadarObjectSensor& DtRadarObjectSensor::operator= | ( | const DtRadarObjectSensor & | orig | ) | [private] |
assignment operator; not implemented
| virtual bool DtRadarObjectSensor::init | ( | ) | [virtual] |
Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry().
This must be called after construction and before the sensor is used on an entity.
Reimplemented from DtSignatureObjectSensor.
| virtual DtString DtRadarObjectSensor::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 DtSignatureObjectSensor.
| virtual int DtRadarObjectSensor::sensorType | ( | ) | const [virtual] |
Returns DtSensorTypeRadar.
Reimplemented from DtSignatureObjectSensor.
| virtual void DtRadarObjectSensor::tick | ( | ) | [virtual] |
Turns on the emitter system in the first tick, as indicated in
When it is time for the next detection attempt (cached in myRadarSensorPSR), calls DtSignatureObjectSensor::tick() and computes and stores time to next detection attempt in myRadarSensorPSR. If entity is destroyed, calls destroyEmitterSystem(). If entity has been restored, calls createAndInitEmitterSystem(). Calls emitter system's tick().
Reimplemented from DtSignatureObjectSensor.
| static DtSimComponent* DtRadarObjectSensor::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). |
Reimplemented from DtSignatureObjectSensor.
| virtual bool DtRadarObjectSensor::detectObject | ( | DtVrfObject * | object, |
| DtRwSensorContactInfo * | contactInfo | ||
| ) | [protected, virtual] |
Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.
Reimplemented from DtSignatureObjectSensor.
| virtual bool DtRadarObjectSensor::continueDetectingObject | ( | DtVrfObject * | object, |
| DtRwSensorContactInfo * | contactInfo, | ||
| bool & | contactInfoModified | ||
| ) | [protected, virtual] |
Overridden from DtSignatureObjectSensor to check if beam emitter beam is turned on or off.
Reimplemented from DtSignatureObjectSensor.
| virtual const char* DtRadarObjectSensor::defaultPSRType | ( | ) | const [protected, virtual] |
Reimplemented from DtObjectSensor.
| virtual void DtRadarObjectSensor::createAndInitEmitterSystem | ( | ) | [protected, virtual] |
Creates a new DtVrfEmitterSystem and assigns it to myEmitterSystem.
Sets the emitter system data from the descriptor. Registers for setEmitter message callbacks.
| virtual void DtRadarObjectSensor::destroyEmitterSystem | ( | ) | [protected, virtual] |
Removes the emitter system.
| static void DtRadarObjectSensor::setEmitterRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static, protected] |
Static callback method for setEmitter messages.
| virtual void DtRadarObjectSensor::processSetEmitterRequestMessage | ( | DtSimMessage * | msg | ) | [protected, virtual] |
Calls setEmitterSystemOn() with the value specified in the message if the message matches our emitter system ID.
| static void DtRadarObjectSensor::setRadarModeRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static, protected] |
| virtual void DtRadarObjectSensor::processSetRadarModeRequestMessage | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| static void DtRadarObjectSensor::requestRadarModesAdminCallback | ( | const DtVrfObjectMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
| virtual void DtRadarObjectSensor::processRequestRadarModesAdmin | ( | DtString | receiver, |
| DtString | sender, | ||
| bool | isEchelonId, | ||
| const DtVrfObjectMessage * | msg | ||
| ) | [protected, virtual] |
| virtual void DtRadarObjectSensor::setEmitterSystemOn | ( | bool | onOff | ) | [protected, virtual] |
Changes the on/off state of myEmitterSystem, and changes the emitter system on value in the PSR.
const DtRadarObjectSensorDescriptor* DtRadarObjectSensor::myRadarObjectSensorDescriptor [protected] |
DtVrfEmitterSystem* DtRadarObjectSensor::myEmitterSystem [protected] |
DtObjectSensor's myProcessState cast to our PSR type.
This class with not new or delete this object. Base class does that.
bool DtRadarObjectSensor::myFirstTick [protected] |
Flag for knowing the first tick of this component. Needed to initialize from PSR.
DtU8 DtRadarObjectSensor::myEmitterSystemId [protected] |